commit ed80e803b552931ea699f220f72e0bbb373903c5 Author: eabdullin Date: Wed Sep 10 12:17:39 2025 +0300 Initial import diff --git a/.abuild.metadata b/.abuild.metadata new file mode 100644 index 0000000..c49904c --- /dev/null +++ b/.abuild.metadata @@ -0,0 +1 @@ +c2caa86e07efd6f1fab96451913c0f15eba6848d SOURCES/abuild-3.15.0.tar.gz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1c8c263 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/abuild-3.15.0.tar.gz diff --git a/SOURCES/0001-Do-not-build-docs.patch b/SOURCES/0001-Do-not-build-docs.patch new file mode 100644 index 0000000..c20cdff --- /dev/null +++ b/SOURCES/0001-Do-not-build-docs.patch @@ -0,0 +1,41 @@ +From 2fcfe30ada216ecab26365df6468bae35afa22a3 Mon Sep 17 00:00:00 2001 +From: Andrew Lukoshko +Date: Mon, 7 Jul 2025 17:20:06 +0000 +Subject: [PATCH] Do not build docs + +--- + Makefile | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 143a1b0..73fe9da 100644 +--- a/Makefile ++++ b/Makefile +@@ -80,7 +80,7 @@ TEST_TIMEOUT = 60 + + P=$(PACKAGE)-$(VERSION) + +-all: $(USR_BIN_FILES) $(MAN_PAGES) functions.sh abuild.conf ++all: $(USR_BIN_FILES) functions.sh abuild.conf + + clean: + @rm -f $(USR_BIN_FILES) $(MAN_PAGES) *.o functions.sh abuild.conf Kyuafile \ +@@ -129,14 +129,12 @@ Kyuafile: tests/Kyuafile + check: $(SCRIPTS) $(USR_BIN_FILES) functions.sh tests/Kyuafile Kyuafile tests/testdata/abuild.key.pub + kyua --variable parallelism=$(shell nproc) test || (kyua report --verbose && exit 1) + +-install: $(USR_BIN_FILES) $(SAMPLES) $(MAN_PAGES) $(AUTOTOOLS_TOOLCHAIN_FILES) default.conf abuild.conf functions.sh ++install: $(USR_BIN_FILES) $(SAMPLES) $(AUTOTOOLS_TOOLCHAIN_FILES) default.conf abuild.conf functions.sh + install -D -m 755 -t $(DESTDIR)/$(bindir)/ $(USR_BIN_FILES);\ + chmod 4555 $(DESTDIR)/$(bindir)/abuild-sudo + for i in adduser addgroup apk; do \ + ln -fs abuild-sudo $(DESTDIR)/$(bindir)/abuild-$$i; \ + done +- install -D -m 644 -t $(DESTDIR)/$(mandir)/man1/ $(MAN_1_PAGES);\ +- install -D -m 644 -t $(DESTDIR)/$(mandir)/man5/ $(MAN_5_PAGES);\ + if [ -n "$(DESTDIR)" ] || [ ! -f "/$(sysconfdir)"/abuild.conf ]; then\ + install -D -m 644 -t $(DESTDIR)/$(sysconfdir)/ abuild.conf; \ + fi +-- +2.43.5 + diff --git a/SOURCES/0002-Allow-running-abuild-rootbld.patch b/SOURCES/0002-Allow-running-abuild-rootbld.patch new file mode 100644 index 0000000..7bbfc4d --- /dev/null +++ b/SOURCES/0002-Allow-running-abuild-rootbld.patch @@ -0,0 +1,25 @@ +From 69ca4cba46da4b28445537f457149cb0000301eb Mon Sep 17 00:00:00 2001 +From: Andrew Lukoshko +Date: Mon, 7 Jul 2025 18:04:31 +0000 +Subject: [PATCH] Allow running abuild rootbld + +--- + abuild.in | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/abuild.in b/abuild.in +index c33a230..3a455e3 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -2522,8 +2522,6 @@ rootbld() { + return + fi + +- $APK info -eq abuild-rootbld || die "rootbld: abuild-rootbld package not installed" +- + [ $CBUILD = $CHOST ] || die "rootbld: set CBUILD=$CHOST to build for $CHOST" + + local qarch cachedir="" +-- +2.43.5 + diff --git a/SOURCES/0003-Do-not-use-bwrap-clearenv.patch b/SOURCES/0003-Do-not-use-bwrap-clearenv.patch new file mode 100644 index 0000000..e237eec --- /dev/null +++ b/SOURCES/0003-Do-not-use-bwrap-clearenv.patch @@ -0,0 +1,32 @@ +From cbba7b83994cba4a4c5839a02e17e6e17b26629a Mon Sep 17 00:00:00 2001 +From: Andrew Lukoshko +Date: Mon, 7 Jul 2025 18:13:35 +0000 +Subject: [PATCH] Do not use bwrap clearenv + +--- + abuild.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/abuild.in b/abuild.in +index 3a455e3..789cb55 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -2650,7 +2650,6 @@ rootbld() { + --bind "$REPODEST" "$REPODEST" \ + --hostname "build-$buildhost-$CARCH" \ + --chdir "$startdir" \ +- --clearenv \ + --setenv abuild_srcdir /tmp/src \ + --setenv pkgbasedir /tmp/pkg \ + --setenv tmpdir /tmp/tmp \ +@@ -2666,6 +2665,7 @@ rootbld() { + --setenv PATH ${USE_CCACHE:+/usr/lib/ccache/bin:}/bin:/usr/bin:/sbin:/usr/sbin \ + --setenv FAKEROOTDONTTRYCHOWN 1 \ + --unsetenv CBUILD \ ++ /usr/bin/env -i \ + /usr/bin/abuild $force rootbld_actions + update_abuildrepo_index + cleanup $CLEANUP +-- +2.43.5 + diff --git a/SOURCES/abuild.sysusers b/SOURCES/abuild.sysusers new file mode 100644 index 0000000..05fca79 --- /dev/null +++ b/SOURCES/abuild.sysusers @@ -0,0 +1 @@ +g abuild - diff --git a/SOURCES/abuild.tmpfiles b/SOURCES/abuild.tmpfiles new file mode 100644 index 0000000..06103ea --- /dev/null +++ b/SOURCES/abuild.tmpfiles @@ -0,0 +1 @@ +d /var/cache/distfiles 0775 root abuild - diff --git a/SPECS/abuild.spec b/SPECS/abuild.spec new file mode 100644 index 0000000..1785c10 --- /dev/null +++ b/SPECS/abuild.spec @@ -0,0 +1,102 @@ +Name: abuild +Version: 3.15.0 +Release: 1%{?dist} +Summary: Alpine build tools + +License: GPL-2.0-or-later +URL: https://gitlab.alpinelinux.org/alpine/abuild +Source0: %{url}/-/archive/%{version}/%{name}-%{version}.tar.gz +Source1: %{name}.sysusers +Source2: %{name}.tmpfiles + +Patch0: 0001-Do-not-build-docs.patch +Patch1: 0002-Allow-running-abuild-rootbld.patch +Patch2: 0003-Do-not-use-bwrap-clearenv.patch + +BuildRequires: zlib-devel +BuildRequires: make +BuildRequires: gcc +BuildRequires: openssl-devel +BuildRequires: systemd +BuildRequires: sed + +Requires: alpine-keyring +Requires: pax-utils +Requires: openssl +Requires: apk-tools +Requires: attr +Requires: tar +Requires: pkgconf +Requires: lzip +Requires: curl +Requires: bubblewrap >= 0.5.0 +Requires: gettext +Requires: git-core +Requires: fakeroot + +# Optional dependencies for cpan resolver +Recommends: perl +Recommends: perl-libwww-perl +Recommends: perl-JSON +Recommends: perl-Module-Build-Tiny +Recommends: perl-LWP-Protocol-https + +# Optional dependencies for gem resolver +Recommends: ruby +Recommends: ruby-augeas + +# Additional optional tools +Suggests: atools + +%description +abuild is a set of scripts used to build Alpine Linux packages. + +%prep +%setup -q -n %{name}-%{version} +%patch0 -p1 +%patch1 -p1 +#patch2 -p1 + +%build +make VERSION=%{version} + +%install +make install VERSION=%{version} DESTDIR=%{buildroot} + +install -Dm 644 %{SOURCE1} %{buildroot}%{_sysusersdir}/%{name}.conf +install -Dm 644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/%{name}.conf + +for bin in %{buildroot}%{_bindir}/*; do + sed -E -i "${bin}" \ + -e '1s|#!/bin/ash$|#!/usr/sbin/busybox ash|' \ + -e '1s|#!/bin/ash\s+(.*)$|#!/usr/sbin/busybox ash\nset \1|' +done + +%files +%config(noreplace) /etc/%{name}.conf +%{_bindir}/abuild +%attr(4755,root,root) %{_bindir}/abuild-addgroup +%attr(4755,root,root) %{_bindir}/abuild-adduser +%attr(4755,root,root) %{_bindir}/abuild-apk +%{_bindir}/abuild-fetch +%{_bindir}/abuild-gzsplit +%{_bindir}/abuild-keygen +%{_bindir}/abuild-rmtemp +%{_bindir}/abuild-sign +%attr(4755,root,root) %{_bindir}/abuild-sudo +%{_bindir}/abuild-tar +%{_bindir}/abump +%{_bindir}/apkbuild-cpan +%{_bindir}/apkbuild-gem-resolver +%{_bindir}/apkbuild-pypi +%{_bindir}/apkgrel +%{_bindir}/buildlab +%{_bindir}/checkapk +%{_bindir}/newapkbuild +%{_datadir}/%{name} +%{_sysusersdir}/%{name}.conf +%{_tmpfilesdir}/%{name}.conf + +%changelog +* Mon Jul 07 2025 Andrew Lukoshko - 3.15.0-1 +- Initial RPM release