bsd: libbsd talloc (#12301)

* Update libbsd

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* bsd: Build Run on linux/386.

* bsd: Build Run on linux/amd64.

* bsd: Build Run on linux/arm/v7.

* bsd: Package File Update Run on linux/386 container.

* Update talloc, and refactor getrealdeps.rb

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* bsd: Package File Update Run on linux/386 container.

* bsd: Package File Update Run on linux/amd64 container.

* bsd: Package File Update Run on linux/arm/v7 container.

* Further adjust workflows.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: satmandu <satmandu@users.noreply.github.com>
This commit is contained in:
chromebrew-actions[bot]
2025-07-30 13:47:54 -05:00
committed by GitHub
parent b00c45dae1
commit f951614543
12 changed files with 105 additions and 67 deletions

View File

@@ -326,7 +326,7 @@ jobs:
group: ${{ matrix.arch }}-${{ github.workflow }}-${{ inputs.branch || github.ref_name }}
cancel-in-progress: true
steps:
- name: fail if build jobs failed
- name: Fail if build jobs failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Dump GitHub context
@@ -449,7 +449,7 @@ jobs:
- update-package-files
if: ${{ !cancelled() }}
steps:
- name: fail if update or build jobs failed, otherwise create a PR
- name: Fail if update or build jobs failed, otherwise create a PR
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Report update & build success
@@ -468,7 +468,8 @@ jobs:
persist-credentials: true
ref: ${{ inputs.branch || github.ref_name }}
token: ${{ steps.get_workflow_token.outputs.token }}
- name: Rebase to master
- name: Rebase to master and save git log
id: rebase-and-git-log
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
@@ -477,6 +478,9 @@ jobs:
git reset --hard "origin/${{ inputs.branch || github.ref_name }}"
git pull --rebase origin master && git push -f
git log --oneline -10
git checkout master && git pull
git log --oneline master..${{ inputs.branch || github.ref_name }} | tr '\n' '\0' | xargs -0 -n1 echo "- $*" >> /tmp/commits.txt
git checkout "${{ inputs.branch || github.ref_name }}"
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
@@ -511,6 +515,9 @@ jobs:
rm -rf /tmp/pr.txt
echo -e "## Description" >> /tmp/pr.txt
echo -e "- This PR was built using the Build.yml workflow, which was pointed to the ${{ inputs.branch || github.ref_name }} branch.\n" >> /tmp/pr.txt
echo -e "#### Commits:" >> /tmp/pr.txt
# Get git log from rebase-and-git-log step.
cat /tmp/commits.txt >> /tmp/pr.txt
if [[ "${CHANGED_GITHUB_CONFIG_FILES}" != "" ]]; then
echo -e "### Updated GitHub configuration files:" >> /tmp/pr.txt
for file in ${CHANGED_GITHUB_CONFIG_FILES}
@@ -545,9 +552,9 @@ jobs:
cat /tmp/pr.txt
[[ $PR_TYPE == 'Draft Pull Request' ]] && export PR_DRAFT_FLAG='-d'
if [[ -z ${PR_NUMBER} ]]; then
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "Build: ${{ inputs.branch || github.ref_name }} started at ${TIMESTAMP}." -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "${{ inputs.branch || github.ref_name }}: Build for ${CHANGED_PACKAGES}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
else
gh pr edit -F /tmp/pr.txt
gh pr edit --title "${{ inputs.branch || github.ref_name }}: Build for ${CHANGED_PACKAGES}" -F /tmp/pr.txt
fi
# Draft PRs can not be set to automerge.
if [[ PR_TYPE == 'Draft Pull Request' ]]; then

View File

@@ -12,6 +12,11 @@ on:
branch:
description: "Branch of chromebrew/chromebrew to run on, if different from this branch."
required: false
update_package_files:
description: "Update Package Files."
required: false
type: boolean
default: 'true'
env:
BRANCH: ${{ inputs.branch || github.ref_name }}
permissions:
@@ -165,7 +170,7 @@ jobs:
group: ${{ matrix.arch }}-${{ github.workflow }}-${{ inputs.branch || github.ref_name }}
cancel-in-progress: true
steps:
- name: fail if build jobs failed
- name: Fail if build jobs failed
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Dump GitHub context
@@ -219,7 +224,10 @@ jobs:
- name: Run Updater in container
id: run-updater
if: ${{ contains(needs.*.result, 'failure') || !cancelled() }}
env:
UPDATE_PACKAGE_FILES: ${{ github.event.inputs.update_package_files }}
run: |
[[ "$UPDATE_PACKAGE_FILES" == 'false' ]] && exit 0
if [ "$PLATFORM" == 'linux/arm/v7' ] && [ -z "${armv7l_PACKAGES}" ]; then
# Exit the arm container if there are not armv7l compatible packages.
echo "Skipping armv7l container builds &/or package file updates."
@@ -287,7 +295,7 @@ jobs:
- update-package-files
if: ${{ !cancelled() }}
steps:
- name: fail if update or build jobs failed, otherwise create a PR
- name: Fail if update or build jobs failed, otherwise create a PR
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1
- name: Report update & build success
@@ -297,7 +305,8 @@ jobs:
fetch-depth: 0
persist-credentials: true
ref: ${{ inputs.branch || github.ref_name }}
- name: Rebase to master
- name: Rebase to master and save git log
id: rebase-and-git-log
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
@@ -306,6 +315,9 @@ jobs:
git reset --hard "origin/${{ inputs.branch || github.ref_name }}"
git pull --rebase origin master && git push -f
git log --oneline -10
git checkout master && git pull
git log --oneline master..${{ inputs.branch || github.ref_name }} | tr '\n' '\0' | xargs -0 -n1 echo "- $*" >> /tmp/commits.txt
git checkout "${{ inputs.branch || github.ref_name }}"
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
@@ -347,6 +359,9 @@ jobs:
run: |
rm -rf /tmp/pr.txt
echo -e "## Description" >> /tmp/pr.txt
echo -e "#### Commits:" >> /tmp/pr.txt
# Get git log from rebase-and-git-log step.
cat /tmp/commits.txt >> /tmp/pr.txt
if [[ "${CHANGED_GITHUB_CONFIG_FILES}" != "" ]]; then
echo -e "### Updated GitHub configuration files:" >> /tmp/pr.txt
for file in ${CHANGED_GITHUB_CONFIG_FILES}
@@ -382,9 +397,9 @@ jobs:
[[ $DRAFT_PR == 'true' ]] && export PR_DRAFT_FLAG='-d'
PR_NUMBER=$(gh pr list -H ${{ inputs.branch || github.ref_name }}| cut -f1)
if [[ -z ${PR_NUMBER} ]]; then
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "${{ inputs.branch || github.ref_name }} at ${TIMESTAMP}." -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "${{ inputs.branch || github.ref_name }}: ${CHANGED_PACKAGES}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
else
gh pr edit -F /tmp/pr.txt
gh pr edit --title "${{ inputs.branch || github.ref_name }}: ${CHANGED_PACKAGES}" -F /tmp/pr.txt
fi
# Draft PRs can not be set to automerge.
if [[ $DRAFT_PR == 'true' ]]; then

View File

@@ -328,7 +328,8 @@ jobs:
fetch-depth: 0
persist-credentials: true
ref: ${{ inputs.branch || github.ref_name }}
- name: Rebase to master
- name: Rebase to master and save git log
id: rebase-and-git-log
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
@@ -337,6 +338,9 @@ jobs:
git reset --hard "origin/${{ inputs.branch || github.ref_name }}"
git pull --rebase origin master && git push -f
git log --oneline -10
git checkout master && git pull
git log --oneline master..${{ inputs.branch || github.ref_name }} | tr '\n' '\0' | xargs -0 -n1 echo "- $*" >> /tmp/commits.txt
git checkout "${{ inputs.branch || github.ref_name }}"
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
@@ -378,6 +382,9 @@ jobs:
rm -rf /tmp/pr.txt
echo -e "## Description" >> /tmp/pr.txt
echo -e "- This PR was built using the No-Compile-Needed.yml workflow, which was pointed to the ${{ inputs.branch || github.ref_name }} branch.\n" >> /tmp/pr.txt
echo -e "#### Commits:" >> /tmp/pr.txt
# Get git log from rebase-and-git-log step.
cat /tmp/commits.txt >> /tmp/pr.txt
if [[ "${CHANGED_GITHUB_CONFIG_FILES}" != "" ]]; then
echo -e "### Updated GitHub configuration files:" >> /tmp/pr.txt
for file in ${CHANGED_GITHUB_CONFIG_FILES}
@@ -412,9 +419,9 @@ jobs:
cat /tmp/pr.txt
[[ $DRAFT_PR == 'true' ]] && export PR_DRAFT_FLAG='-d'
if [[ -z ${PR_NUMBER} ]]; then
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "Build: ${{ inputs.branch || github.ref_name }} started at ${TIMESTAMP}." -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
PR_NUMBER=$(gh pr create ${PR_DRAFT_FLAG} --reviewer chromebrew/active --title "${{ inputs.branch || github.ref_name }}: Build for ${CHANGED_PACKAGES}" -F /tmp/pr.txt | rev | cut -d"/" -f1 | rev)
else
gh pr edit -F /tmp/pr.txt
gh pr edit --title "${{ inputs.branch || github.ref_name }}: Build for ${CHANGED_PACKAGES}" -F /tmp/pr.txt
fi
# Draft PRs can not be set to automerge.
if [[ $DRAFT_PR == 'true' ]]; then

View File

@@ -31,7 +31,7 @@
/usr/local/lib/libbsd.la
/usr/local/lib/libbsd.so
/usr/local/lib/libbsd.so.0
/usr/local/lib/libbsd.so.0.11.8
/usr/local/lib/libbsd.so.0.12.2
/usr/local/lib/pkgconfig/libbsd-ctor.pc
/usr/local/lib/pkgconfig/libbsd-overlay.pc
/usr/local/lib/pkgconfig/libbsd.pc
@@ -162,8 +162,6 @@
/usr/local/share/man/man3/TAILQ_PREV.3bsd.zst
/usr/local/share/man/man3/TAILQ_REMOVE.3bsd.zst
/usr/local/share/man/man3/TAILQ_SWAP.3bsd.zst
/usr/local/share/man/man3/TIMESPEC_TO_TIMEVAL.3bsd.zst
/usr/local/share/man/man3/TIMEVAL_TO_TIMESPEC.3bsd.zst
/usr/local/share/man/man3/arc4random.3bsd.zst
/usr/local/share/man/man3/arc4random_addrandom.3bsd.zst
/usr/local/share/man/man3/arc4random_buf.3bsd.zst
@@ -257,18 +255,19 @@
/usr/local/share/man/man3/timercmp.3bsd.zst
/usr/local/share/man/man3/timerisset.3bsd.zst
/usr/local/share/man/man3/timersub.3bsd.zst
/usr/local/share/man/man3/timespec.3bsd.zst
/usr/local/share/man/man3/timespecadd.3bsd.zst
/usr/local/share/man/man3/timespecclear.3bsd.zst
/usr/local/share/man/man3/timespeccmp.3bsd.zst
/usr/local/share/man/man3/timespecisset.3bsd.zst
/usr/local/share/man/man3/timespecsub.3bsd.zst
/usr/local/share/man/man3/timeval.3bsd.zst
/usr/local/share/man/man3/tree.3bsd.zst
/usr/local/share/man/man3/uid_from_user.3bsd.zst
/usr/local/share/man/man3/unvis.3bsd.zst
/usr/local/share/man/man3/user_from_uid.3bsd.zst
/usr/local/share/man/man3/verrc.3bsd.zst
/usr/local/share/man/man3/vis.3bsd.zst
/usr/local/share/man/man3/vwarnc.3bsd.zst
/usr/local/share/man/man3/warnc.3bsd.zst
/usr/local/share/man/man3/wcslcat.3bsd.zst
/usr/local/share/man/man3/wcslcpy.3bsd.zst
/usr/local/share/man/man7/libbsd.7.zst

View File

@@ -2,12 +2,12 @@
/usr/local/include/talloc.h
/usr/local/lib/libpytalloc-util.cpython-313-arm-linux-gnueabihf.so
/usr/local/lib/libpytalloc-util.cpython-313-arm-linux-gnueabihf.so.2
/usr/local/lib/libpytalloc-util.cpython-313-arm-linux-gnueabihf.so.2.4.2
/usr/local/lib/libtalloc-compat1-2.4.2.so
/usr/local/lib/libpytalloc-util.cpython-313-arm-linux-gnueabihf.so.2.4.3
/usr/local/lib/libtalloc-compat1-2.4.3.so
/usr/local/lib/libtalloc.so
/usr/local/lib/libtalloc.so.1
/usr/local/lib/libtalloc.so.2
/usr/local/lib/libtalloc.so.2.4.2
/usr/local/lib/libtalloc.so.2.4.3
/usr/local/lib/pkgconfig/pytalloc-util.cpython-313-arm-linux-gnueabihf.pc
/usr/local/lib/pkgconfig/talloc.pc
/usr/local/lib/python3.13/site-packages/talloc.cpython-313-arm-linux-gnueabihf.so

View File

@@ -31,7 +31,7 @@
/usr/local/lib/libbsd.la
/usr/local/lib/libbsd.so
/usr/local/lib/libbsd.so.0
/usr/local/lib/libbsd.so.0.11.8
/usr/local/lib/libbsd.so.0.12.2
/usr/local/lib/pkgconfig/libbsd-ctor.pc
/usr/local/lib/pkgconfig/libbsd-overlay.pc
/usr/local/lib/pkgconfig/libbsd.pc
@@ -162,8 +162,6 @@
/usr/local/share/man/man3/TAILQ_PREV.3bsd.zst
/usr/local/share/man/man3/TAILQ_REMOVE.3bsd.zst
/usr/local/share/man/man3/TAILQ_SWAP.3bsd.zst
/usr/local/share/man/man3/TIMESPEC_TO_TIMEVAL.3bsd.zst
/usr/local/share/man/man3/TIMEVAL_TO_TIMESPEC.3bsd.zst
/usr/local/share/man/man3/arc4random.3bsd.zst
/usr/local/share/man/man3/arc4random_addrandom.3bsd.zst
/usr/local/share/man/man3/arc4random_buf.3bsd.zst
@@ -257,18 +255,19 @@
/usr/local/share/man/man3/timercmp.3bsd.zst
/usr/local/share/man/man3/timerisset.3bsd.zst
/usr/local/share/man/man3/timersub.3bsd.zst
/usr/local/share/man/man3/timespec.3bsd.zst
/usr/local/share/man/man3/timespecadd.3bsd.zst
/usr/local/share/man/man3/timespecclear.3bsd.zst
/usr/local/share/man/man3/timespeccmp.3bsd.zst
/usr/local/share/man/man3/timespecisset.3bsd.zst
/usr/local/share/man/man3/timespecsub.3bsd.zst
/usr/local/share/man/man3/timeval.3bsd.zst
/usr/local/share/man/man3/tree.3bsd.zst
/usr/local/share/man/man3/uid_from_user.3bsd.zst
/usr/local/share/man/man3/unvis.3bsd.zst
/usr/local/share/man/man3/user_from_uid.3bsd.zst
/usr/local/share/man/man3/verrc.3bsd.zst
/usr/local/share/man/man3/vis.3bsd.zst
/usr/local/share/man/man3/vwarnc.3bsd.zst
/usr/local/share/man/man3/warnc.3bsd.zst
/usr/local/share/man/man3/wcslcat.3bsd.zst
/usr/local/share/man/man3/wcslcpy.3bsd.zst
/usr/local/share/man/man7/libbsd.7.zst

View File

@@ -2,12 +2,12 @@
/usr/local/include/talloc.h
/usr/local/lib/libpytalloc-util.cpython-313-i386-linux-gnu.so
/usr/local/lib/libpytalloc-util.cpython-313-i386-linux-gnu.so.2
/usr/local/lib/libpytalloc-util.cpython-313-i386-linux-gnu.so.2.4.2
/usr/local/lib/libtalloc-compat1-2.4.2.so
/usr/local/lib/libpytalloc-util.cpython-313-i386-linux-gnu.so.2.4.3
/usr/local/lib/libtalloc-compat1-2.4.3.so
/usr/local/lib/libtalloc.so
/usr/local/lib/libtalloc.so.1
/usr/local/lib/libtalloc.so.2
/usr/local/lib/libtalloc.so.2.4.2
/usr/local/lib/libtalloc.so.2.4.3
/usr/local/lib/pkgconfig/pytalloc-util.cpython-313-i386-linux-gnu.pc
/usr/local/lib/pkgconfig/talloc.pc
/usr/local/lib/python3.13/site-packages/talloc.cpython-313-i386-linux-gnu.so

View File

@@ -31,7 +31,7 @@
/usr/local/lib64/libbsd.la
/usr/local/lib64/libbsd.so
/usr/local/lib64/libbsd.so.0
/usr/local/lib64/libbsd.so.0.11.8
/usr/local/lib64/libbsd.so.0.12.2
/usr/local/lib64/pkgconfig/libbsd-ctor.pc
/usr/local/lib64/pkgconfig/libbsd-overlay.pc
/usr/local/lib64/pkgconfig/libbsd.pc
@@ -162,8 +162,6 @@
/usr/local/share/man/man3/TAILQ_PREV.3bsd.zst
/usr/local/share/man/man3/TAILQ_REMOVE.3bsd.zst
/usr/local/share/man/man3/TAILQ_SWAP.3bsd.zst
/usr/local/share/man/man3/TIMESPEC_TO_TIMEVAL.3bsd.zst
/usr/local/share/man/man3/TIMEVAL_TO_TIMESPEC.3bsd.zst
/usr/local/share/man/man3/arc4random.3bsd.zst
/usr/local/share/man/man3/arc4random_addrandom.3bsd.zst
/usr/local/share/man/man3/arc4random_buf.3bsd.zst
@@ -257,18 +255,19 @@
/usr/local/share/man/man3/timercmp.3bsd.zst
/usr/local/share/man/man3/timerisset.3bsd.zst
/usr/local/share/man/man3/timersub.3bsd.zst
/usr/local/share/man/man3/timespec.3bsd.zst
/usr/local/share/man/man3/timespecadd.3bsd.zst
/usr/local/share/man/man3/timespecclear.3bsd.zst
/usr/local/share/man/man3/timespeccmp.3bsd.zst
/usr/local/share/man/man3/timespecisset.3bsd.zst
/usr/local/share/man/man3/timespecsub.3bsd.zst
/usr/local/share/man/man3/timeval.3bsd.zst
/usr/local/share/man/man3/tree.3bsd.zst
/usr/local/share/man/man3/uid_from_user.3bsd.zst
/usr/local/share/man/man3/unvis.3bsd.zst
/usr/local/share/man/man3/user_from_uid.3bsd.zst
/usr/local/share/man/man3/verrc.3bsd.zst
/usr/local/share/man/man3/vis.3bsd.zst
/usr/local/share/man/man3/vwarnc.3bsd.zst
/usr/local/share/man/man3/warnc.3bsd.zst
/usr/local/share/man/man3/wcslcat.3bsd.zst
/usr/local/share/man/man3/wcslcpy.3bsd.zst
/usr/local/share/man/man7/libbsd.7.zst

View File

@@ -2,12 +2,12 @@
/usr/local/include/talloc.h
/usr/local/lib64/libpytalloc-util.cpython-313-x86-64-linux-gnu.so
/usr/local/lib64/libpytalloc-util.cpython-313-x86-64-linux-gnu.so.2
/usr/local/lib64/libpytalloc-util.cpython-313-x86-64-linux-gnu.so.2.4.2
/usr/local/lib64/libtalloc-compat1-2.4.2.so
/usr/local/lib64/libpytalloc-util.cpython-313-x86-64-linux-gnu.so.2.4.3
/usr/local/lib64/libtalloc-compat1-2.4.3.so
/usr/local/lib64/libtalloc.so
/usr/local/lib64/libtalloc.so.1
/usr/local/lib64/libtalloc.so.2
/usr/local/lib64/libtalloc.so.2.4.2
/usr/local/lib64/libtalloc.so.2.4.3
/usr/local/lib64/pkgconfig/pytalloc-util.cpython-313-x86_64-linux-gnu.pc
/usr/local/lib64/pkgconfig/talloc.pc
/usr/local/lib64/python3.13/site-packages/talloc.cpython-313-x86_64-linux-gnu.so

View File

@@ -3,7 +3,7 @@ require 'buildsystems/autotools'
class Libbsd < Autotools
description 'This library provides useful functions commonly found on BSD systems, and lacking on others like GNU systems, thus making it easier to port projects with strong BSD origins, without needing to embed the same code over and over again on each project.'
homepage 'https://libbsd.freedesktop.org/wiki/'
version '0.11.8'
version '0.12.2'
license 'BSD, BSD-2, BSD-4, ISC'
compatibility 'all'
source_url 'https://git.hadrons.org/git/libbsd.git'
@@ -11,10 +11,10 @@ class Libbsd < Autotools
binary_compression 'tar.zst'
binary_sha256({
aarch64: '3694af8410ff0ba9261dcd8173293db4c53d9b78ee7e6986695e290ac26d7f05',
armv7l: '3694af8410ff0ba9261dcd8173293db4c53d9b78ee7e6986695e290ac26d7f05',
i686: '32371f0f80a0edf09a17200498282148433258ece7b6db1184445e04309c6bff',
x86_64: 'e5d2f97a309a82dd90312386b289cc9e63b22e92b373f9e93adbc4e53d0761de'
aarch64: '9fc6d842cc4c7c8578fc90976b3711ec5e4ac3a3d2c8b574ffcc6ecdf93ad224',
armv7l: '9fc6d842cc4c7c8578fc90976b3711ec5e4ac3a3d2c8b574ffcc6ecdf93ad224',
i686: '2918bce4644d2f5fbf9cf10f405dd74d2289f9121350076feca2a5b501a3919d',
x86_64: 'efc53d7a9d88b2ce3de3c0f8bc6269326d0275ce97e0cf22b6d18b22092b87a5'
})
depends_on 'glibc' # R

View File

@@ -6,7 +6,7 @@ require 'package'
class Talloc < Package
description 'Hierarchical pool based memory allocator with destructors'
homepage 'https://talloc.samba.org/'
version "2.4.2-#{CREW_PY_VER}"
version "2.4.3-#{CREW_PY_VER}"
license 'LGPL'
compatibility 'all'
source_url "https://www.samba.org/ftp/talloc/talloc-#{version.split('-').first}.tar.gz"
@@ -14,10 +14,10 @@ class Talloc < Package
binary_compression 'tar.zst'
binary_sha256({
aarch64: '1619aeed34e6ef39470a26f70d063b527950a9d97d3f09bc4eb0f9bb3366c29d',
armv7l: '1619aeed34e6ef39470a26f70d063b527950a9d97d3f09bc4eb0f9bb3366c29d',
i686: '0efa7e4bb5effc9461cb6ad682fd5aa2b19f993bdbd47aa08ed6cca082530a3a',
x86_64: '61cddcc6102531dd5395a6372ad425a45967bc2906f35e96b6157b32568a02c3'
aarch64: '6a39df0ca1191342d76f7f4ae7d108f9c33d5b27834541c32529d56f2bcb3547',
armv7l: '6a39df0ca1191342d76f7f4ae7d108f9c33d5b27834541c32529d56f2bcb3547',
i686: '90472b76ee72650033c302168d71a2ae23154d84583d554906a10039ad94cae0',
x86_64: '40e36519b57f33feeae188636bc3510f6f3ae1cf982640de7da134c5e6f970ea'
})
depends_on 'docbook_xsl' => :build
@@ -25,7 +25,8 @@ class Talloc < Package
depends_on 'glibc' # R
depends_on 'libbsd' # R
depends_on 'libxcrypt' => :build
depends_on 'python3' # R
# depends_on 'python3' # R (optional) # For Python bindings.
depends_on 'python3' => :build
def self.build
system "./configure #{CREW_CONFIGURE_OPTIONS.sub(/--program-suffix.*/, '')} \

View File

@@ -1,5 +1,5 @@
#!/usr/local/bin/ruby
# getrealdeps version 1.8 (for Chromebrew)
# getrealdeps version 1.9 (for Chromebrew)
# Author: Satadru Pramanik (satmandu) satadru at gmail dot com
require 'fileutils'
@@ -116,8 +116,8 @@ def main(pkg)
# Leave early if we didn't find any dependencies.
return if pkgdeps.empty?
# Look for missing runtime dependencies.
missingpkgdeps = pkgdeps.reject { |i| File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("depends_on '#{i}'") unless File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("depends_on '#{i}' => :build") }
# Look for missing runtime dependencies, ignoring build and optional deps.
missingpkgdeps = pkgdeps.reject { |i| File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("depends_on '#{i}'") unless File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("depends_on '#{i}' => :build") || File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("# depends_on '#{i}' # R (optional)") }
# Special cases where dependencies should not be automatically added:
@@ -144,30 +144,39 @@ def main(pkg)
pkgdeps.delete_if { |d| /#{exclusion_regex}/.match(d) }
end
missingpkgdeps.delete_if { |d| File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("# depends_on '#{d}' # R (optional)") }
pkgdeps.delete_if { |d| File.read("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").include?("# depends_on '#{d}' # R (optional)") }
puts "\nPackage #{pkg} has runtime library dependencies on these packages:".lightblue
pkgdeps.each do |i|
puts " depends_on '#{i}' # R".lightgreen
end
# Leave if we didn't find any missing dependencies.
return if missingpkgdeps.empty?
puts "\nPackage file #{pkg}.rb is missing these runtime library dependencies:".orange
puts " depends_on '#{missingpkgdeps.join("' # R\n depends_on '")}' # R".orange
# Get existing package deps entries so we can add to and sort as
# necessary.
pkgdepsblock = []
pkgdepsblock += File.foreach("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").grep(/ depends_on '| # depends_on '/)
missingpkgdeps.each do |adddep|
puts " depends_on '#{adddep}' # R"
unless missingpkgdeps.empty?
puts "\nPackage file #{pkg}.rb is missing these runtime library dependencies:".orange
puts " depends_on '#{missingpkgdeps.join("' # R\n depends_on '")}' # R".orange
# Add missing dependencies to the package.
puts "\n Adding deps: #{adddep}"
gawk_cmd = if File.foreach("#{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb").grep(/depends_on/).any?
# This files contains dependencies already, so add new deps after existing dependencies.
"gawk -i inplace -v dep=\" depends_on '#{adddep}' # R\" 'FNR==NR{ if (/depends_on/) p=NR; next} 1; FNR==p{ print dep }' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
else
# This files doesn't contain deps, so just add new deps.
"gawk -i inplace -v dep=\" depends_on '#{adddep}' # R\" 'FNR==NR{ if (/})/) p=NR; next} 1; FNR==p{ print \"\\n\" dep }' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
end
system(gawk_cmd)
pkgdepsblock += missingpkgdeps.map { |add_dep| " depends_on '#{add_dep}' # R" }
end
pkgdepsblock.uniq!
pkgdepsblock = pkgdepsblock.sort_by { |dep| dep.split('depends_on ')[1] }
puts "\n Adding to or replacing deps block in package..."
# First remove all dependencies.
system "sed -i '/ depends_on /d' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
system "sed -i '/^ # depends_on /d' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
# Now add back our sorted dependencies.
gawk_cmd = "gawk -i inplace -v dep=\"#{pkgdepsblock.join('QQQQQ')}\" 'FNR==NR{ if (/})/) p=NR; next} 1; FNR==p{ print \"\\n\" dep }' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
system(gawk_cmd)
# The first added line has two dependencies without a newline
# separating them.
system "sed -i 's/RQQQQQ/R\\n/' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
system "sed -i 's/QQQQQ//g' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
# Check for and delete old runtime dependencies.
# Its unsafe to do this with other dependencies, because the packager might know something we don't.
@@ -189,6 +198,8 @@ def main(pkg)
puts "\nPackage file #{pkg}.rb has these outdated runtime library dependencies:".lightpurple
puts lines_to_delete.keys
system("gawk -i inplace 'NR != #{lines_to_delete.values.join(' && NR != ')}' #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb")
# Clean up any blank lines with rubocop.
system "rubocop --only Layout/EmptyLines -A #{CREW_PREFIX}/lib/crew/packages/#{pkg}.rb"
end
ARGV.each do |package|