Skip to content

Commit

Permalink
Merge pull request #16 from dimkr/releases
Browse files Browse the repository at this point in the history
Add manually-triggered releases and monthly builds
  • Loading branch information
dimkr authored Mar 4, 2022
2 parents 90584ea + 4ca0afe commit eb7783a
Show file tree
Hide file tree
Showing 10 changed files with 69 additions and 9 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: build

on:
schedule:
- cron: '0 0 2 * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup
run: |
echo "dash dash/sh boolean false" | sudo debconf-set-selections
sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
- name: build.sh
run: ./build.sh tarball
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: release

on:
workflow_dispatch:

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup
run: |
echo "dash dash/sh boolean false" | sudo debconf-set-selections
sudo DEBIAN_FRONTEND=noninteractive dpkg-reconfigure dash
- name: build.sh
run: ./build.sh tarball
- name: Get version
id: get_version
run: echo "::set-output name=version::$(date "+%Y%m%d")"
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.version }}
release_name: ${{ steps.get_version.outputs.version }}
draft: false
prerelease: false
- name: Upload tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: initrd_progs-${{ steps.get_version.outputs.version }}-static.tar.xz
asset_name: initrd_progs-static.tar.xz
asset_content_type: application/x-xz-compressed-tar
1 change: 1 addition & 0 deletions build.conf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ fsck.f2fs
fsck.fat
#mp
ntfs-3g
ntfsfix
resize2fs
resize.f2fs
'
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ case "$1" in release|tarball) #this contains the $PREBUILT_BINARIES
$0 -nord -auto -arch $2
pkgx=initrd_progs-${2}-$(date "+%Y%m%d")-static.tar.xz
else
for a in ${ARCH_LIST} ; do $0 -nord -auto -arch $a ; done
for a in ${ARCH_LIST} ; do $0 -nord -auto -arch $a || exit 1 ; done
pkgx=initrd_progs-$(date "+%Y%m%d")-static.tar.xz
fi
echo -e "\n\n\n*** Creating $pkgx"
Expand Down
5 changes: 3 additions & 2 deletions func
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,10 @@ function _install() {
fi
chmod +x "$file"
cp "$file" "$dest"
file $file | grep -E 'dynamically|shared' && {
file $file | grep -v 'pie executable' | grep -E 'dynamically|shared' && {
echo "$file is not static..!"
exit_error 1
# bullseye says busybox is an 'ELF 32-bit LSB pie executable', focal says it's an 'ELF 32-bit LSB shared object'
[ -z "$GITHUB_ACTIONS" ] && exit_error 1
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/busybox_static/busybox_static.petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ build() {
#-
for KONFIG in $ENABLE_KONFIG
do
sed -i "s|.*${KONFIG}.*|${KONFIG}=y|" .config
sed -i "s|^${KONFIG}=.*|${KONFIG}=y|" .config
done
for KONFIG in $DISABLE_KONFIG $BLACKLIST
do
sed -i "s|.*${KONFIG}=.*|# ${KONFIG} is not set|" .config
sed -i "s|^${KONFIG}=.*|# ${KONFIG} is not set|" .config
done
#-
[ -d "$XPATH" ] && CRC="CROSS_COMPILE=${XCOMPILER}-" #XCOMPILER is set in func
Expand Down
2 changes: 1 addition & 1 deletion pkg/cryptsetup_static/cryptsetup_static.petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ popt_ver=1.18 #2020-06-23
#lvm2_ver=2.02.116 #Jan 30 2015
#lvm2_ver=2.02.162 #Jul 28 2016
lvm2_ver=2.02.168 #Nov 30 2016
gpg_error_ver=1.24 #Jul 14 2016
gpg_error_ver=1.44 #Jan 27 2022
gcrypt_ver=1.7.2 #Jul 14 2016

#-----------------------
Expand Down
6 changes: 3 additions & 3 deletions pkg/dialog_static/dialog_static.petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
. ../../func
. ../libs.sh # ncurses

URL=https://invisible-island.net/datafiles/release
URL=https://invisible-mirror.net/archives/dialog
SRC=dialog
PKG=dialog_static
VER=1.3-20191110
COMP=tar.gz
COMP=tgz
DESC="Displays user-friendly dialog boxes from shell scripts"
CAT=BuildingBlock
CWD=`pwd`
Expand Down Expand Up @@ -44,7 +44,7 @@ package() {

# main
ncurses_download
retrieve ${SRC}.${COMP} ${SRC}-${VER}.${COMP}
retrieve ${SRC}-${VER}.${COMP} ${SRC}-${VER}.${COMP}
[ "$DLD_ONLY" = "yes" ] && exit
extract ${SRC}-${VER}.${COMP}
build
Expand Down
1 change: 1 addition & 0 deletions pkg/findutils_static/findutils_static.petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ CWD=`pwd`

build() {
cd ${SRC}-${VER}
sed 's~#include <stdint.h>~&\n#include <sys/sysmacros.h>~' -i gl/lib/mountlist.c
opts='--prefix=/usr --disable-nls --without-selinux --enable-dependency-tracking'
_configure
_make ${MKFLG} LDFLAGS=-static
Expand Down
1 change: 1 addition & 0 deletions pkg/fuse-exfat_static/fuse-exfat_static.petbuild
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ build() {
cd ${SRC}-${VER}
#export FUSE_LIBS=${libfuse_dir}/lib/libfuse3.a
export FUSE_LIBS=${libfuse_dir}/lib/libfuse.a
export PKG_CONFIG_PATH=${libfuse_dir}/lib/pkgconfig
opts="--prefix=/usr"
_configure
_make ${MKFLG} LDFLAGS=-static
Expand Down

0 comments on commit eb7783a

Please sign in to comment.