From 0d409f4047e85b9f0c31ae2258459a635698b160 Mon Sep 17 00:00:00 2001 From: "Florine W. Dekker" Date: Tue, 28 Nov 2023 20:18:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20mommy=20removes=20obs?= =?UTF-8?q?=20and=20adds=20apt-mommy~?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 51 ++++++++++++++++++++++++++++++- README.md | 66 +++++++++++++++++++++++++++++----------- pkg/README.md | 33 -------------------- pkg/obs/debian.changelog | 5 --- pkg/obs/debian.compat | 1 - pkg/obs/debian.control | 10 ------ pkg/obs/debian.rules | 12 -------- pkg/obs/mommy.dsc | 7 ----- pkg/obs/mommy.spec | 43 -------------------------- pkg/rpkg/mommy.spec.rpkg | 3 ++ 10 files changed, 101 insertions(+), 130 deletions(-) delete mode 100644 pkg/README.md delete mode 100644 pkg/obs/debian.changelog delete mode 100644 pkg/obs/debian.compat delete mode 100644 pkg/obs/debian.control delete mode 100644 pkg/obs/debian.rules delete mode 100644 pkg/obs/mommy.dsc delete mode 100644 pkg/obs/mommy.spec diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 9963c79..f3c0f3e 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -18,6 +18,7 @@ jobs: - name: nop run: true + build-linux: needs: [ check-release-needed ] runs-on: ubuntu-latest @@ -198,6 +199,55 @@ jobs: body_path: RELEASE_NOTES.md files: mommy* + release-apt: + needs: [ release-mommy ] + runs-on: ubuntu-latest + + steps: + - name: Download built packages + uses: actions/download-artifact@v3 + with: + name: dist + - name: Checkout mommy + uses: actions/checkout@v4 + - name: Checkout apt-mommy + uses: actions/checkout@v4 + with: + repository: fwdekker/apt-mommy + token: ${{ secrets.personal_access_token }} + - name: Extract version number + run: echo "MOMMY_VERSION=v$(head -n 1 ./mommy/version)" >> $GITHUB_ENV + - name: Import GPG key + run: echo "$apt_gpg_private_key" | gpg --import + env: + apt_gpg_private_key: ${{ secrets.apt_gpg_private_key }} + - name: Update apt repository + run: | + echo "::group::Copy .deb into apt-mommy" + cp *.deb apt-mommy/deb/ + echo "::endgroup::" + + echo "::group::Update repo" + cd apt-mommy/ + ./update.sh + cd ../ + echo "::endgroup::" + + echo "::group::Commit update" + cd apt-mommy/ + git add --all + git config --global user.name "FWDekkerBot" + git config --global user.email "bot@fwdekker.com" + git commit -am "🔖 mommy added package mommy $MOMMY_VERSION~" + cd ../ + echo "::endgroup::" + + echo "::group::Push changes" + cd apt-mommy/ + git push origin + cd ../ + echo "::endgroup::" + release-aur: needs: [ release-mommy ] runs-on: ubuntu-latest @@ -266,7 +316,6 @@ jobs: sudo -u build git push origin master dev echo "::endgroup::" - release-homebrew: needs: [ release-mommy ] runs-on: ubuntu-latest diff --git a/README.md b/README.md index bbec76a..1cf5da1 100644 --- a/README.md +++ b/README.md @@ -83,8 +83,33 @@ otherwise not satisfied?
debian/ubuntu/apt-based -subscribing to a repository (with automatic updates) [is planned](https://github.com/FWDekker/mommy/issues/53)~ - +* **apt** (automatic updates) + installs from the [mommy apt repository](https://github.com/FWDekker/apt-mommy). + the repository supports all architectures and suites~ + 1. register the repository in apt: + ([more info](https://stackoverflow.com/a/71384057/)) + ```shell + sudo mkdir -p /etc/apt/keyrings/ + + wget -O- https://raw.githubusercontent.com/FWDekker/apt-mommy/main/deb/Release.key | \ + gpg --dearmor | \ + sudo tee /etc/apt/keyrings/mommy.gpg > /dev/null + + echo "deb [signed-by=/etc/apt/keyrings/mommy.gpg] https://raw.githubusercontent.com/FWDekker/apt-mommy/main/deb/ ./" | \ + sudo tee /etc/apt/sources.list.d/mommy.list > /dev/null + ``` + 2. (optional) + tell apt not to install any other packages from the mommy repo: + ([more info](https://wiki.debian.org/DebianRepository/UseThirdParty#Standard_pinning)) + ```shell + echo -e "Package: *\nPin: origin o=mommy\nPin-Priority: 100" | \ + sudo tee /etc/apt/preferences.d/pin-fwdekker-mommy > /dev/null + ``` + 3. install mommy: + ```shell + sudo apt update + sudo apt install mommy + ``` * **homebrew** (automatic updates) installs from the [mommy tap](https://github.com/FWDekker/homebrew-mommy). (requires [brew](https://brew.sh/).) @@ -211,13 +236,12 @@ subscribing to a repository (with automatic updates) [is planned](https://github
-red hat/fedora/rpm-based +red hat/fedora/opensuse/rpm-based since mommy is just a shell script these methods also work fine on opensuse~ * **dnf (copr)** (automatic updates) - installs from the [copr repository](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/), allowing for automatic - updates. + installs from the [copr repository](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/). (requires the `dnf-plugins-core` package.) ```shell sudo dnf copr enable fwdekker/mommy @@ -225,6 +249,15 @@ since mommy is just a shell script these methods also work fine on opensuse~ ``` packages are signed by `fwdekker#mommy@copr.fedorahosted.org`, check for fingerprint `E332 C8E6 ADAA 58E4 1974 7CE2 CE16 3CFF 9F79 DD8A`~ +* **yum (copr)** (automatic updates) + installs from the [copr repository](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/). + (requires the `yum-plugin-core` package.) + ```shell + sudo yum copr enable fwdekker/mommy + sudo yum install mommy + ``` + packages are signed by `fwdekker#mommy@copr.fedorahosted.org`, check for fingerprint + `E332 C8E6 ADAA 58E4 1974 7CE2 CE16 3CFF 9F79 DD8A`~ * **homebrew** (automatic updates) installs from the [mommy tap](https://github.com/FWDekker/homebrew-mommy). (requires [brew](https://brew.sh/).) @@ -624,7 +657,7 @@ if that annoys you, run `make build` after each change, and use `build/bin/mommy ### 🏬 distribution mommy is distributed in three ways: * attached as **binary packages** to each github release, -* built on **external build servers**, +* built on **build servers**, * and available as **source builds** ("ports", basically) on a few servers. let's go into them in more detail~ @@ -668,18 +701,15 @@ unfortunately, packages for macos, netbsd, and openbsd cannot be built on system
-🏗️ external build servers +🏗️ build servers build servers build mommy distributions on-demand for each release, and make the created packages available for all users. how sweet~ +* [apt-mommy](https://github.com/FWDekker/apt-mommy) is a github-based apt repository that hosts mommy's `.deb` packages + after they have been built in [mommy's cd pipeline](https://github.com/FWDekker/mommy/actions/workflows/cd.yml)~ * [copr](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/) builds packages for fedora and epel~ -* [openbuildservice](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy) builds packages for all - deb-based and rpm-based systems~ - -see [pkg/README.md](https://github.com/FWDekker/mommy/blob/main/pkg/README.md) for more information on the build -process~
@@ -696,7 +726,7 @@ users connect to the server, get the latest instructions, and their system build
### 📯 release -`main` always contains the latest stable version. +[`main`](https://github.com/FWDekker/mommy/tree/main) always contains the latest stable version. every merge into `main` automatically build and releases a new version~
@@ -710,8 +740,6 @@ every merge into `main` automatically build and releases a new version~ * remove empty subsections for the new release~ * ensure no line breaks are used as whitespace; github release notes use them as actual line breaks~ - * update `pkg/obs/debian.changelog` if changes were made to obs's debian packaging process~ - * update `pkg/obs/mommy.spec` if changes were made to obs's rpm packaging process~ * update `pkg/rpkg/mommy.spec.rpkg` if changes were made to copr's rpkg packaging process~ * update acknowledgements in `README.md`~ * update promotional images in `.github/img/`~ @@ -724,12 +752,12 @@ every merge into `main` automatically build and releases a new version~ * [copr](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/) * updated automatically when `mommy` updates * always [manually check deployment status](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/builds/)~ + * [apt-mommy](https://github.com/FWDekker/apt-mommy/) + * updated automatically when `mommy` updates + * always [manually check deployment status](https://github.com/FWDekker/apt-mommy/commits/main)~ * [homebrew-mommy](https://github.com/FWDekker/homebrew-mommy) * updated automatically when `mommy` updates * always [manually check deployment status](https://github.com/FWDekker/homebrew-mommy/actions?query=branch%3Amain)~ - * [openbuildservice](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy) - * updated automatically when `mommy` updates - * always [manually check deployment status](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy)~
### 🤠 contribution guidelines @@ -769,3 +797,5 @@ if mommy should add, remove, or change anything here, [open an issue](https://gi [several neat improvements](https://github.com/FWDekker/mommy/pull/61)~ * mommy thanks [aemogie.](https://github.com/aemogie) for [telling her how to integrate with nushell](https://github.com/FWDekker/mommy/issues/65)~ +* mommy thanks [maximilian downey twiss](https://github.com/Zopolis4) for + [bumping mommy's actions to their latest versions](https://github.com/FWDekker/mommy/pull/68)~ diff --git a/pkg/README.md b/pkg/README.md deleted file mode 100644 index 8f60805..0000000 --- a/pkg/README.md +++ /dev/null @@ -1,33 +0,0 @@ -this directory contains files used by external build servers~ - -## obs -obs is for [openbuildservice](https://build.opensuse.org/package/show/home:fwdekker:mommy/mommy), which works by looking -at the `_service` file (stored in the build server's own repo), which itself states that obs should download this repo, -extract the `pkg/obs/` directory, and then run [`obs-build`](https://github.com/openSUSE/obs-build). -there are two entry points: -* `mommy.dsc` for deb-based outputs, in total using the following files: - * `debian.changelog` is the changelog, - * `debian.compat` describes the - [debhelper compatibility level](https://www.debian.org/doc/manuals/maint-guide/dother.en.html#compat), - * `debian.control` describes the build logic, - * `debian.rules` is a sort of makefile for - [debhelper](https://manpages.debian.org/testing/debhelper/debhelper.7.en.html), - * and `mommy.dsc` contains build-independent metadata; and -* `mommy.spec` for rpm-based outputs~ - -the whole architecture here was heavily inspired (which means: basically copied) from -[mpz](https://build.opensuse.org/package/show/home:oleg_antonyan/mpz)~ - -### setup notes -a few notes for future reference in how obs was set up~ - -1. to allow obs to find its own packages during installation, configure each of the project's repositories to include - `openSUSE:Tools` on its repository path~ -2. to resolve the error - `have choice for (glibc-langpack-en or glibc-all-langpacks) needed by obs-service-obs_scm-common: glibc-all-langpacks glibc-langpack-en`, - add the line `Prefer: glibc-langpack-en` to the project's configuration ("prjconf")~ - - -## rpkg -rpkg is for [copr](https://copr.fedorainfracloud.org/coprs/fwdekker/mommy/), which works by downloading this repo, -`cd`ing into `pkg/rpkg`, and then running [rpkg](https://pagure.io/rpkg-util)~ diff --git a/pkg/obs/debian.changelog b/pkg/obs/debian.changelog deleted file mode 100644 index cb778a3..0000000 --- a/pkg/obs/debian.changelog +++ /dev/null @@ -1,5 +0,0 @@ -mommy (1.2.5-1) stable; urgency=low - - * Initial release using OpenBuildService. - - -- Florine W. Dekker Sat, 25 Nov 2023 13:01:09 +0000 diff --git a/pkg/obs/debian.compat b/pkg/obs/debian.compat deleted file mode 100644 index f599e28..0000000 --- a/pkg/obs/debian.compat +++ /dev/null @@ -1 +0,0 @@ -10 diff --git a/pkg/obs/debian.control b/pkg/obs/debian.control deleted file mode 100644 index f64a193..0000000 --- a/pkg/obs/debian.control +++ /dev/null @@ -1,10 +0,0 @@ -Source: mommy -Section: misc -Priority: optional -Maintainer: Florine W. Dekker -Build-Depends: debhelper (>= 10) -Homepage: https://github.com/FWDekker/mommy - -Package: mommy -Architecture: any -Description: mommy's here to support you, in any shell~ ❤️ diff --git a/pkg/obs/debian.rules b/pkg/obs/debian.rules deleted file mode 100644 index 0b02bb0..0000000 --- a/pkg/obs/debian.rules +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/make -f - -export DESTROOT="$(CURDIR)/debian/mommy" - -%: - dh $@ - -override_dh_auto_install: - dh_auto_install -- prefix="$(DESTROOT)/usr/" - -override_dh_auto_test: - echo "Skipping tests" diff --git a/pkg/obs/mommy.dsc b/pkg/obs/mommy.dsc deleted file mode 100644 index 2a49775..0000000 --- a/pkg/obs/mommy.dsc +++ /dev/null @@ -1,7 +0,0 @@ -Format: 1.0 -Source: mommy -Version: placeholder -Binary: mommy -Maintainer: Florine W. Dekker -Architecture: any -Build-Depends: debhelper (>= 10) diff --git a/pkg/obs/mommy.spec b/pkg/obs/mommy.spec deleted file mode 100644 index 3090332..0000000 --- a/pkg/obs/mommy.spec +++ /dev/null @@ -1,43 +0,0 @@ -Name: mommy -Version: placeholder -Release: placeholder -Summary: mommy's here to support you, in any shell~ ❤️ -License: Unlicense -URL: https://github.com/FWDekker/mommy -VCS: git+https://github.com/fwdekker/mommy.git -Source: mommy-%{version}.tar.gz -BuildArch: noarch -BuildRequires: make - -%description -mommy's here to support you! mommy will compliment you if things go well, and -will encourage you if things are not going so well~ - -mommy is fully customizable, integrates with any shell, works on any system, and -most importantly, loves you very much~ ❤️ - -%prep -%setup -q - -%clean -rm -rf "%{buildroot}" - -%build -make build - -%install -make prefix="%{buildroot}/%{_prefix}/" install - -%files -%{_bindir}/mommy -%{_mandir}/man1/mommy.1.gz -%{_datarootdir}/fish/vendor_completions.d/mommy.fish -%{_datarootdir}/zsh/site-functions/_mommy - -%changelog -# Changelog lists changes to the packaging, not to the software. -* Sat Nov 25 2023 Florine W. Dekker 1.2.5-1 -- Rewrite script for OpenBuildService. - -* Tue Mar 14 2023 Florine W. Dekker 1.2.3-1 -- Initial release with rpkg. diff --git a/pkg/rpkg/mommy.spec.rpkg b/pkg/rpkg/mommy.spec.rpkg index deb28ee..2227886 100644 --- a/pkg/rpkg/mommy.spec.rpkg +++ b/pkg/rpkg/mommy.spec.rpkg @@ -32,6 +32,9 @@ make prefix="%{buildroot}/%{_prefix}/" install %check MOMMY_EXEC="%{buildroot}/%{_prefix}/bin/mommy" make shellspec_bin="%{_tmppath}/shellspec/shellspec" test/unit +%clean +rm -rf "%{_tmppath}/shellspec/" + %files %{_bindir}/mommy %doc %{_mandir}/man1/mommy.1.gz