Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pkg/obextra/brltty
  • yianiris/brltty
  • nfg/brltty-no-polkit
3 results
Show changes
Commits on Source (66)
trunk/brltty
trunk/pkg/
trunk/src/
trunk/*.pkg.tar.xz
trunk/*.pkg.tar.xz.sig
version/*/bin/
a
b
patch-prepare.sh
patch-make.sh
migrate.sh
migrate_upstream.sh
\ No newline at end of file
image: obarun/pkgbuild:latest
variables:
repo: "$CI_PROJECT_DIR"
pkg_name: "$CI_PROJECT_NAME"
ssh_private_key: "$SSH_PRIVATE_KEY"
ssh_known_host: "$SSH_KNOWN_HOSTS"
pkg_target: "$CI_COMMIT_REF_NAME"
repo_conf: ".repositories.conf"
# followed variable are ignored but
# need to be set
pkg_track: "branch"
pkg_address: "$CI_PROJECT_URL"
.job_variables: &job_variables
variables:
GIT_SUBMODULE_STRATEGY: none
GIT_DEPTH: 0
PKG_TOKEN: ${PKG_TOKEN}
.job_rules_push: &job_rules_push
rules:
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG == null'
.job_rules_schedule: &job_rules_schedule
rules:
- if: '$CI_PIPELINE_SOURCE == "schedule"'
.job_rules_web: &job_rules_web
rules:
- if: '$CI_PIPELINE_SOURCE == "web"'
.job_rules_pipeline: &job_rules_pipeline
rules:
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
.copy_files: &copy_files
before_script:
- mkdir -p /etc/pkg
- cp ./pkg.cfg /etc/pkg/pkg.cfg
- cp ./pacman.conf.builder /etc/pacman.conf.builder
stages:
- update
- build
- rebuild
- deploy
build_repo:
update:
stage: update
<<: *job_variables
<<: *job_rules_schedule
<<: *copy_files
script:
- apkg-update.sh
build:
stage: build
<<: *job_variables
<<: *job_rules_push
<<: *copy_files
script:
- cp ./${repo_conf} /etc/${repo_conf}
- builder.sh --chdir=trunk
retry:
max: 2
- apkg-prepare.sh
- apkg-build.sh
- apkg-tag.sh
artifacts:
name: $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA
expire_in: 2 days
name: $CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA
paths:
- "*.pkg.tar.xz"
only:
changes:
- trunk/PKGBUILD
- "*.pkg.tar.xz"
- build.env
rebuild:from:
stage: rebuild
<<: *job_variables
<<: *job_rules_pipeline
<<: *copy_files
script:
- apkg-rebuild.sh
artifacts:
name: $CI_PROJECT_NAME-$CI_COMMIT_SHORT_SHA
paths:
- "*.pkg.tar.xz"
rebuild:dynamic:
stage: rebuild
<<: *job_rules_push
<<: *copy_files
needs: ["build"]
script:
- apkg-generate.sh > dynamic-config.yml
artifacts:
paths:
- dynamic-config.yml
rebuild:packages:
stage: rebuild
<<: *job_variables
<<: *job_rules_push
needs: ["rebuild:dynamic","build"]
trigger:
include:
- artifact: dynamic-config.yml
job: rebuild:dynamic
strategy: depend
deploy:
<<: *job_variables
<<: *job_rules_push
stage: deploy
only:
changes:
- trunk/PKGBUILD
script:
- deploy.sh
needs: ["build","rebuild:packages"]
script:
- apkg-deploy.sh
[submodule "brltty"]
path = brltty
url = https://gitlab.archlinux.org/archlinux/packaging/packages/brltty
branch = main
update = merge
Copyright (c) 2015-2020 Eric Vidal <eric@obarun.org>
Copyright (c) 2015-2020 Jean-Michel T.Dydak <jean-michel@obarun.org>
Copyright (c) 2023 Eric Vidal <eric@obarun.org>
All rights reserved.
Permission to use, copy, modify, and/or distribute this software for any
......@@ -7,9 +6,9 @@ purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Template for automatically tracking and building a package when the upstream Arch Linux project upgrade a new tag.
This template allow to rebuild a required by package if needed.
This can only be used at `Obcore` and `Obextra` repository. If you want to add a package to `Obcommunity`, use the [prototype-pkg](https://git.obarun.org/pkg/prototype-pkg) instead.
We are using the `acpid` package as an example. Therefore, substitute `acpid` with the one you require.
# Install for a new project
## Create a clone
Make a clone of this [repository](https://git.obarun.org/pkg/prototype-apkg)
```
git clone https://git.obarun.org/pkg/prototype-apkg
```
Rename the directory `acpid` and go inside
```
mv prototype-apkg acpid
cd acpid
```
Destroy the .git directory
```
rm -rf .git
```
Initiate a fresh git repository
```
git init --initial-branch=master
```
## Configure the git remote origin
We need to define where is the remote origin of the repository. To do so
```
git remote add origin ssh://git@git.obarun.org:22023/pkg/obextra/acpid.git
```
The `ssh` access is preferable but if you may want to use https instead of ssh, just replace the address by
```
git remote add origin https://git.obarun.org/pkg/obextra/acpid.git
```
## Prepare the submodule
Edit the .gitmodules file and replace `<project_name>` by the name of the package, in our case `acpid`.
The final file should be:
```
[submodule "acpid"]
path = acpid
url = https://gitlab.archlinux.org/archlinux/packaging/packages/acpid
branch = main
update = merge
```
Now we need to add to git `refs` of the submodule to the project.
```
git submodule add -b main https://gitlab.archlinux.org/archlinux/packaging/packages/acpid acpid
git submodule update --init
git submodule update --remote --merge
```
## Prepare the necessary directories
**Do not forget to execute the command above before continuing. The patch-prepare.sh assume that the submodule already exist.**
Execute
```
./patch-prepare.sh acpid
```
This command create the necessary directories as the following
```
.
├── README.md
├── a
│ ├── PKGBUILD
│ ├── acpid.service
│ ├── anything
│ └── handler.sh
├── acpid
│ ├── PKGBUILD
│ ├── acpid.service
│ ├── anything
│ └── handler.sh
├── b
│ ├── PKGBUILD
│ ├── acpid.service
│ ├── anything
│ └── handler.sh
├── diff
│ ├── file
│ ├── patch
│ └── rebuild
├── pacman.conf.builder
├── patch-make.sh
├── patch-prepare.sh
└── pkg.cfg
```
### `a` and `b` directories
As you can see the `a` and `b` directories are strict copy of the submodule directory `acpid`.
#### `a` directory
You should never touch this directory. This is the original one used by `patch-make.sh` script to create the patch. So, leave it as it.
#### `b` directory
This is the directory where you make changes.
**Do not forget**, we talk about the preparation for a patch. So, trying to remove/adding files **has no effects**. Only changes contains of files.
## Make the patch file
When you are done with your changes, execute
```
./patch-make.sh acpid
```
This command will create a patch file at `diff/patch/PKG.patch` will somehting similar too (depending of your changes at `b` directory)
```
diff -uar a/PKGBUILD b/PKGBUILD
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,7 +16,6 @@
replaces=('acpid2')
backup=('etc/acpi/handler.sh' 'etc/acpi/events/anything')
source=("https://downloads.sourceforge.net/sourceforge/acpid2/$pkgname-$pkgver.tar.xz"
- 'acpid.service'
'anything'
'handler.sh')
sha256sums=('2d095c8cfcbc847caec746d62cdc8d0bff1ec1bc72ef7c674c721e04da6ab333'
@@ -38,8 +37,7 @@
install -Dm644 ../anything "$pkgdir/etc/acpi/events/anything"
install -Dm755 ../handler.sh "$pkgdir/etc/acpi/handler.sh"
- # systemd
- install -Dm644 ../acpid.service "$pkgdir/usr/lib/systemd/system/acpid.service"
+
}
# vim:set ts=2 sw=2 et:
```
This patch will be applied before any build.
## Add, commit and push to the repository project
This is the final step. Simply add, commit and push your project to the remote one.
```
git add .
git commit -m "First commit"
git push -u origin master
```
## Make the project publicly accessible
Make sure that the project is publicly accessible. To do so:
Connect to [`gitlab`](https://git.obarun.org) obarun instance.
- On the left sidebar, select **Search or go to** and find your project.
- Select **Settings** > **General**.
- Expand **Visibility, project features, permissions**
- Under **Project visibility** pick **public** at drop-down menu.
## Schedule the project
Connect to [`gitlab`](https://git.obarun.org) obarun instance.
- On the left sidebar, select **Search or go to** and find your project.
- Select **Build** > **Pipeline schedules**.
- Select **New schedule** and fill the form. *Consider at least 24hours between schedule update*.
See complete gitlab [documentation](https://docs.gitlab.com/ee/ci/pipelines/schedules.html#add-a-pipeline-schedule) about pipeline schedule.
# diff directory explanation
This directory can be used to add files or other patch files depending of your needs.
It also allow you to define packages that need to be rebuild if `acpid` get a new tag from Arch upstream.
## diff/file
This directory is used to add extra files to the build directory. For example you may want to add a `acpid.install` file. This is the good place to do it. Simply add any files that you want and a verbatim copy will be made at `acpid` submodule directory before any build.
## diff/patch
This directory contains patch files as `PKG.patch` created automatically previously. You can place any patch file that you want is this directory but you need to conform to the `-Np1` option used by the runner script to patch the files. So, be sure to conform to this rule.
## diff/rebuild
This directory is used to define which packages need to be rebuild against a new project tag.
For instance, if `acpid` receives a new tag, you might also consider rebuilding `vte3`. Please note that this example is not meaningful as `vte3` does not have `acpid` as a dependency. It is provided purely for illustrative purposes.
In this scenario, just generate an empty file using the following syntax: `path@of@project`, where `@` substitutes for `/`.
For example create an empty file `pkg@obextra@vte3`.
```
touch diff/rebuild/pkg@obextra@vte3
```
At execution time the `@` will be replaced by `/` to retrieve the path of the projects `https://git.obarun.org/pkg/obextra/vte3`.
Create one file by project.
# Update an existing project
Go to a temporary directory, clone this template project.
```
cd /tmp
git clone ssh://git@git.obarun.org:22023/pkg/prototype-apkg.git
```
Remove the .git directory
```
cd prototype-apkg
rm -rf .git
```
Go to your local project directory to migrate. Obviously, replace the `/home/obarun/pkg/local/obcore/acpid` path with our specific path in this example.
```
cd /home/obarun/pkg/local/obcore/acpid
```
Remove all files and directories ***execpt*** the `.git` directory, we want to keep the history of the project.
```
find . -maxdepth 1 ! -name '.git' -type d -not -path '.' -exec rm -rf {} +
find . -maxdepth 1 -type f -exec rm -rf {} +
```
Copy the templates files to your local project directory.
```
cp -rT /tmp/prototype-apkg .
```
Clean up the template clone directory
```
rm -rf /tmp/prototype-apkg
```
Follow the [Prepare the submodule](#prepare-the-submodule), [Prepare the necessary directories](#prepare-the-necessary-directories), [Make the patch file](#make-the-patch-file) and [Schedule the project](#schedule-the-project) instructions.
finally, Add, commit and push your changes
```
git add .
git commit -m"update to new format"
git push
```
# Reverse Patch Process
## Clone the Project
Begin by cloning the project from the Obarun GitLab instance using the following command:
```
git clone --recurse-submodules acpid
```
## Copy Patch Preparation Files
Copy the patch-prepare.sh and patch-make.sh files from the original [template](https://git.obarun.org/pkg/prototype-apkg).
Make sure these files are made executable. You can use the chmod command to do this:
```
chmod +x patch-prepare.sh patch-make.sh
```
## Execute the Patch Preparation Script
Run the `patch-prepare.sh` script, specifying the project name as an argument. This can be done as follows:
```
./patch-prepare.sh acpid
```
Change directory to the b/ directory:
```
cd b/
```
## Apply the Patch to the `PKGBUILD` File
Use the patch command to apply the patch to the `PKGBUILD` file. Be sure to specify the correct path to the PKG.patch patch file in the diff/patch/ directory. Using `-Np1` indicates the level of directory to skip in the patch path:
```
patch -Np1 -i ../diff/patch/PKG.patch
```
# Upgrading the Patch
Ensure that you are in the root directory of your project.
Execute the following command to fetch all the latest changes from the project repository:
```
git pull
```
Update the submodules using the following command to fetch the latest changes from the project's submodules:
```
git submodule update --remote --merge
```
Use the `patch-prepare.sh` script, specifying your project's name to prepare the patch. This can be done as follows:
```
./patch-prepare.sh acpid
```
Navigate to the `b/` directory where you need to can make changes to the necessary files.
Once you have made the required changes, execute the `patch-make.sh` script to finalize the patch:
```
./patch-make.sh
```
If desired, check the changes with the `git diff` command.
Add the changes to the staging area with the following command:
```
git add .
```
Commit the changes with an informative message regarding the patch update:
```
git commit -m "Update patch"
```
Finally, push the changes to your own Git repository using the command:
```
git push
```
brltty @ 159ae225
Subproject commit 159ae225ac347cc82b9ab9929a5b47d33bead6cc
diff -uar a/PKGBUILD b/PKGBUILD
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgbase=brltty
pkgname=(brltty brltty-udev-generic)
pkgver=6.7
-pkgrel=5
+pkgrel=6
pkgdesc="Braille display driver for Linux/Unix"
arch=(x86_64)
url="https://brltty.app"
@@ -20,7 +20,7 @@
bluez-libs
cython
dbus
- dracut
+ #dracut
espeak-ng
expat
festival
@@ -42,7 +42,6 @@
python-setuptools
speech-dispatcher
strip-nondeterminism
- systemd-libs
tcl
)
options=(!emptydirs)
@@ -104,7 +103,6 @@
ncurses libncursesw.so
pcre2
polkit
- systemd-libs libsystemd.so
)
optdepends=(
'at-spi2-core: X11/GNOME Apps accessibility'
@@ -131,9 +129,7 @@
cd $pkgbase-${pkgbase^^}-$pkgver
# installation does not work reliably with many cores, so set jobs to 1
make -j1 INSTALL_ROOT="$pkgdir" install
- make -j1 INSTALL_ROOT="$pkgdir" install-systemd
make -j1 INSTALL_ROOT="$pkgdir" install-udev
- make -j1 INSTALL_ROOT="$pkgdir" install-dracut
make -j1 INSTALL_ROOT="$pkgdir" install-polkit
install -vDm 644 Documents/$pkgbase.conf -t "$pkgdir/etc/"
#
# pacman.conf used if the options --pacman-conf passed at our-build.sh on the .gitlab.yml file
#
[options]
HoldPkg = pacman glibc
Architecture = auto
IgnorePkg = systemd systemd-libs
NoExtract = usr/lib/libsystemd*.* usr/lib/systemd* etc/systemd*
Color
VerbosePkgLists
ParallelDownloads = 5
#XferCommand =
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#[obcore-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obcore-testing/
#Server = https://cloud.server.obarun.org/$repo/os/$arch/
[obcore]
SigLevel = Required
Server = https://repo.obarun.org/obcore
Server = https://cloud.server.obarun.org/$repo/os/$arch/
#[obextra-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obextra-testing
#Server = https://cloud.server.obarun.org/$repo/os/$arch/
[obextra]
SigLevel = Required
Server = https://repo.obarun.org/obextra
#[obcommunity-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obcommunity-testing
[obcommunity]
SigLevel = Required
Server = https://repo.obarun.org/obcommunity
#[obmultilib-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/obmultilib-testing
#[obmultilib]
#SigLevel = Required
#Server = https://repo.obarun.org/obmultilib
Server = https://cloud.server.obarun.org/$repo/os/$arch/
#[observice-testing]
#SigLevel = Required
#Server = https://repo.obarun.org/observice-testing
#Server = https://cloud.server.obarun.org/$repo/os/$arch/
[observice]
SigLevel = Required
Server = https://repo.obarun.org/observice
Server = https://cloud.server.obarun.org/$repo/os/$arch/
#[testing]
#[core-testing]
#SigLevel = DatabaseOptional
#Include = /etc/pacman.d/mirrorlist
[core]
SigLevel = DatabaseOptional
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
#[community-testing]
#[extra-testing]
#SigLevel = DatabaseOptional
#Include = /etc/pacman.d/mirrorlist
[community]
[extra]
SigLevel = DatabaseOptional
Include = /etc/pacman.d/mirrorlist
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
# Options passed to makepkg
makepkg_opts=( "--noconfirm" "--nosign" "--syncdeps" "--rmdeps" "--clean" "--cleanbuild" )
MAKEFLAGS="-j3"
# Obarun : 66 init/supervisor
# Maintainer : Eric Vidal <eric@obarun.org>
# Maintainer : Jean-Michel T.Dydak <jean-michel@obarun.org>
# Obarun PkgSrc : url="https://framagit.org/pkg/obextra/brltty"
#----------------
# Maintainer :
# Contributor :
# Arch PkgSrc : url="https://www.archlinux.org/packages/extra/x86_64/brltty/"
#----------------
# Website : https://brltty.app
#----------------------------------------------------------------------------
#--DESCRIPTION---------------------------------------------------------------
pkgname=brltty
pkgdesc="Braille display driver for Linux/Unix"
pkgver=6.1
pkgrel=5
url="https://brltty.app"
target="${pkgname}-${pkgver}.tar.bz2"
source=("https://brltty.app/archive/${target}"
'brltty.sysusers'
'brltty.tmpfiles')
#--BUILD CONFIGURATION-------------------------------------------------------
options=('!emptydirs')
makedepends=(
'alsa-lib'
'at-spi2-atk'
'at-spi2-core'
'atk'
'cython'
'dbus'
'espeak-ng'
'festival'
'glib2'
'gpm'
'icu'
'java-environment'
'libxaw'
'ncurses'
'ocaml-ctypes'
'ocaml-findlib'
'speech-dispatcher'
'flite')
#--BUILD PREPARATION---------------------------------------------------------
prepare() {
cd "${pkgname}-${pkgver}"
./autogen
}
#--BUILD CONTROL-------------------------------------------------------------
path=(
'--prefix=/usr'
'--sysconfdir=/etc'
'--localstatedir=/var'
'--mandir=/usr/share/man')
flags=(
'--with-tables-directory=/usr/share/brltty'
'--with-writable-directory=/run/brltty'
'--enable-gpm'
'--disable-stripping'
'--with-flite-voice=cmu_us_kal16')
#--BUILD---------------------------------------------------------------------
build() {
cd "${pkgname}-${pkgver}"
./configure ${path[@]} ${flags[@]}
make
}
#--PACKAGE-------------------------------------------------------------------
package() {
cdepends+=(
'libasound.so'
'libdbus-1.so'
'libgio-2.0.so'
'libglib-2.0.so'
'libgobject-2.0.so'
'libicuuc.so'
'libgpm.so'
'libncursesw.so')
cd "${pkgname}-${pkgver}"
make INSTALL_ROOT="${pkgdir}" install
make INSTALL_ROOT="${pkgdir}" install -C Autostart/Systemd
make INSTALL_ROOT="${pkgdir}" install -C Autostart/Udev
install -vDm 644 "Documents/${pkgname}.conf" -t "${pkgdir}/etc/"
install -vDm 644 "../${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
install -vDm 644 "../${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
}
#--INSTALL CONFIGURATION-----------------------------------------------------
arch=('x86_64')
backup=(etc/brltty.conf)
depends=(
'bluez-libs'
'expat'
'gcc-libs'
'glibc'
'liblouis'
'libspeechd'
'pcre'
'polkit'
'tcl')
optdepends=('at-spi2-core: X11/GNOME Apps accessibility'
'atk: ATK bridge for X11/GNOME accessibility'
'espeak-ng: espeak-ng driver'
'java-runtime: Java support'
'libxaw: X11 support'
'libxt: X11 support'
'libx11: for xbrlapi'
'libxfixes: for xbrlapi'
'libxtst: for xbrlapi'
'ocaml: OCaml support'
'python: Python support'
'speech-dispatcher: speech-dispatcher driver')
provides=('libbrlapi.so')
#--SECURITY AND LICENCE------------------------------------------------------
sha512sums=('a27236fc6211dfe1b9867871eca475a5c82471ea10c1bc3006916f9420764c6f91d5f2cfc5c44c6c76f1120f3ef21c821ca9a804d81ebcad6ecad886c2ef84ad'
'cc2e2d5f33d4e11d6ff828aefc0773ccdc02127ce2f00649c1e3f8d4b39b90789f4a0e41385b344f850c38bd4a1df36d3d9d413a59144d431defdd343633f800'
'a530fe66983768f9dc544af01c586abc101dfa2ed76885b4f1fd78c483b59e8445f2c0dbbfb865dd1cf2874342c346bd35ce978ab246e9cdd31d2d489a14e770')
b2sums=('ed3744173f59c85ac9e2bdef45e65dc98d178e51332f2fc0903763067c0f9a6a806c60989a36c825baa3dbdd1ed0629395318c22134413aa27791e17b3398413'
'e6b7453360ef92254ff1049b387c9ee45f3be0e0259c9c3670154938f61ec4142b2de330401d09e1290ed9ffe8e390ede3472dab0e2f4c69b497f9ac19795aad'
'59f50e367d2e6c6704902ebbd254232aa17c741c9a43ba27d0ebaa5fd4a86f62bc8bdd08e8e4562437dea0efa9d49845e40c022b8c4d7110675d81bf63ac4df4')
license=('LGPL2.1')
post_install () {
[ ! -e /etc/brlapi.key ] && mcookie -v > /etc/brlapi.key
echo "Please add your user to the brlapi group."
}
post_upgrade () {
post_install
}
post_remove() {
[ -e /etc/brlapi.key ] && rm -v /etc/brlapi.key
}
g brlapi -
z /etc/brlapi.key 0640 root brlapi -