Browse Source

initial commit

main
Nicolas Massé 4 years ago
commit
69ee96680b
  1. 1
      .gitattributes
  2. 4
      .gitignore
  3. 25
      SOURCES/dhcp-orange-fibre.patch
  4. 2986
      SPECS/dhcp.spec
  5. 3
      SRPMS/dhcp-4.3.6-45.el8.src.rpm
  6. 38
      build.sh
  7. 37
      release.sh

1
.gitattributes

@ -0,0 +1 @@
*.rpm filter=lfs diff=lfs merge=lfs -text

4
.gitignore

@ -0,0 +1,4 @@
BUILD
BUILDROOT
REPO
RPMS

25
SOURCES/dhcp-orange-fibre.patch

@ -0,0 +1,25 @@
diff --color -ru dhcp-4.3.6.old-patch/common/lpf.c dhcp-4.3.6.patch/common/lpf.c
--- dhcp-4.3.6.old-patch/common/lpf.c 2021-07-29 19:39:46.408565392 +0200
+++ dhcp-4.3.6.patch/common/lpf.c 2021-07-29 21:49:36.240432985 +0200
@@ -118,6 +118,12 @@
log_fatal ("Open a socket for LPF: %m");
}
+ /* ZOC: Set SO_PRIORITY (skb->priority in Linux kernel) to 6.
+ vlan code will then map this priority to 802.1p priority according
+ to egress configuration for the VLAN */
+ int val = 6;
+ setsockopt(sock, SOL_SOCKET, SO_PRIORITY, &val, sizeof (val));
+
memset (&ifr, 0, sizeof ifr);
strncpy (ifr.ifr_name, (const char *)info -> ifp, sizeof ifr.ifr_name);
ifr.ifr_name[IFNAMSIZ-1] = '\0';
@@ -143,7 +149,7 @@
log_fatal ("Bind socket to interface: %m");
}
-
+
return sock;
}
#endif /* USE_LPF_SEND || USE_LPF_RECEIVE */

2986
SPECS/dhcp.spec

File diff suppressed because it is too large

3
SRPMS/dhcp-4.3.6-45.el8.src.rpm

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cde3585a872eb71d66ae5d55622ac6a4bb8bff0af243fac4c61f8d0315ed3e73
size 10383482

38
build.sh

@ -0,0 +1,38 @@
#!/bin/bash
set -Eeuo pipefail
mkdir -p RPMS/x86_64 SRPMS BUILD BUILDROOT
tmp_dir="$(mktemp -d -t mock-XXXXXXXXXX)"
trap "rm -rf $tmp_dir" EXIT
# List of available builders: ls -1 /etc/mock
builder="${BUILDER:-centos-stream-8-x86_64}"
echo "Using builder image $builder..."
function build_pkgs () {
source_rpms=()
for pkg; do
pkg="$(basename "$pkg")"
pkg="${pkg%.spec}"
echo "Processing $pkg..."
spectool -g -R SPECS/$pkg.spec
rpmbuild -bs SPECS/$pkg.spec
source_rpm="SRPMS/$(ls -1ct SRPMS | head -n1)"
echo "Successfully generated $source_rpm!"
source_rpms+=("$source_rpm")
done
echo "Compiling ${source_rpms[@]}..."
#debug_opts="-nN --no-cleanup-after"
debug_opts=""
mock -r "$builder" --resultdir=$tmp_dir $debug_opts "${source_rpms[@]}"
}
if [ $# -gt 0 ]; then
build_pkgs "$@"
else
build_pkgs SPECS/*.spec
fi
rm -f $tmp_dir/*.src.rpm $tmp_dir/*.log
mv $tmp_dir/*.rpm RPMS/x86_64/

37
release.sh

@ -0,0 +1,37 @@
#!/bin/sh
set -Eeuo pipefail
mkdir -p REPO/x86_64 REPO/sources
rsync -a --ignore-existing RPMS/x86_64/ REPO/x86_64
rsync -a --ignore-existing SRPMS/ REPO/sources
createrepo REPO/x86_64
createrepo REPO/sources
cat > REPO/dhclient-orange.repo <<"EOF"
[dhclient-orange]
name=dhclient Orange - CentOS Stream 8 - $basearch
baseurl=https://f003.backblazeb2.com/file/dhclient-orange/$basearch/
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=0
skip_if_unavailable=False
[dhclient-orange-source]
name=dhclient Orange - CentOS Stream 8 - Source
baseurl=https://f003.backblazeb2.com/file/dhclient-orange/sources/
enabled=0
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=0
skip_if_unavailable=False
EOF
rclone sync -P REPO/ backblaze:dhclient-orange
Loading…
Cancel
Save