Removed unused files.

Moved installer files into the ReleaseBuilder
This commit is contained in:
Kenneth Skovhede
2024-04-23 14:24:38 +02:00
parent 0b566ecf1f
commit b73e94de7e
64 changed files with 43 additions and 1793 deletions
@@ -0,0 +1,21 @@
FROM fedora:latest
# Source build packages locally
ARG DOCKER_BUILD_PROXY
ENV DOCKER_BUILD_PROXY $DOCKER_BUILD_PROXY
# Install common build tools
RUN dnf -y install deltarpm
RUN dnf -y upgrade
RUN dnf -y --allowerasing install @"Minimal Install" @buildsys-build yum-utils rpm-sign gnupg rpmdevtools
RUN dnf -y update
# Install build things
RUN dnf -y install desktop-file-utils
LABEL org.label-schema.name = "duplicati/fedora-build" \
org.label-schema.version = "20161230" \
org.label-schema.vendor="Deployable" \
org.label-schema.docker.cmd="docker run -ti duplicati/fedora-build" \
org.label-schema.schema-version="1.0"
@@ -0,0 +1,14 @@
#!/bin/bash
# This file helps mark executables as executable and symlink them to the correct location
# Lines starting with REPL: are repeated for each file in the executable list
# The values %SOURCE% and %TARGET% are replaced with the source and target (symlink) file names
BUILDROOT=$1
EXEC_PREFIX=$2
NAMER=$3
# Fix permissions
REPL: chmod 755 ${BUILDROOT}${EXEC_PREFIX}/lib/${NAMER}/%SOURCE%
# Setup symlinks
REPL: ln -s ../lib/${NAMER}/%SOURCE% ${BUILDROOT}${EXEC_PREFIX}/bin/%TARGET%
@@ -0,0 +1,17 @@
#!/bin/bash
# This file is a workaround to install a directory recursively,
# without hitting limitations of the SPEC file build environment
OLDIFS=$IFS
IFS=$'\n'
for file in $(find "$1" -type d -printf '%P\n'); do
install -p -d -m 755 "$2/${file}"
done
for file in $(find "$1" -type f -printf '%P\n'); do
install -p -D -m 644 "$1/${file}" "$2/${file}"
done
IFS=$OLDIFS
@@ -0,0 +1,153 @@
%define _build_id_links none
# Set up some defaults
%global namer duplicati
%global debug_package %{nil}
%global alphatag .git
%global _builddate %BUILDDATE%
%global _buildversion %BUILDVERSION%
%global _buildtag %BUILDTAG%
Name: %{namer}
Version: %{_buildversion}
Release: %{_buildtag}
Icon: duplicati.xpm
# Disable auto dependencies as it picks up .Net 2.0 profile
# and does not support supplying them with 4.5
# Also, all thirdparty libraries are given as "provides" but they
# are not installed for use externally
AutoReqProv: no
Summary: Backup client for encrypted online backups
License: MIT
URL: https://duplicati.com
Source0: duplicati-%{_buildversion}.tar.bz2
Source1: %{namer}-install-recursive.sh
Source2: %{namer}-install-binaries.sh
Source3: %{namer}.service
Source4: %{namer}.default
Source5: %{namer}.png
Source6: %{namer}.desktop
BuildRequires: desktop-file-utils
BuildRequires: systemd
Requires: desktop-file-utils
Requires: bash
%DEPENDS%
%PROVIDES%
%description
Duplicati is a free backup client that securely stores encrypted,
incremental, compressed backups on cloud storage services and remote file
servers. It supports targets like Amazon S3, Windows Live SkyDrive,
Rackspace Cloud Files or WebDAV, SSH, FTP (and many more).
Duplicati has built-in AES-256 encryption and backups be can signed using
GNU Privacy Guard. A built-in scheduler makes sure that backups are always
up-to-date. Last but not least, Duplicati provides various options and
tweaks like filters, deletion rules, transfer and bandwidth options to run
backups for specific purposes.
%prep
%setup -q -n %{namer}-%{_buildversion}
%build
# Build is expected to be complete
# so no build action is performed
%install
install -d %{buildroot}%{_datadir}/pixmaps/
install -d %{buildroot}%{_exec_prefix}/lib/%{namer}/
install -d %{buildroot}%{_exec_prefix}/lib/%{namer}/licenses/
install -d %{buildroot}%{_exec_prefix}/lib/%{namer}/webroot/
install -d %{buildroot}%{_exec_prefix}/lib/%{namer}/lvm-scripts/
install -d %{buildroot}%{_exec_prefix}/bin/
install -d %{buildroot}%{_unitdir}
install -d %{buildroot}%{_sysconfdir}/sysconfig/
# Remove packaging artifacts
find . -type f -name ._\* | xargs rm -rf
# Install all files, but the list is too long to be in the script itself :/
/bin/bash %{_topdir}/SOURCES/%{namer}-install-recursive.sh "." "%{buildroot}%{_exec_prefix}/lib/%{namer}/"
# Move the icon in to place
install -p %{_topdir}/SOURCES/%{namer}.png %{buildroot}%{_datadir}/pixmaps/
# Fix executable permissions and install symlinks
/bin/bash %{_topdir}/SOURCES/%{namer}-install-binaries.sh "%{buildroot}" "%{_exec_prefix}" "%{namer}"
desktop-file-install %{_topdir}/SOURCES/%{namer}.desktop
# Install the service:
install -p -D -m 644 %{_topdir}/SOURCES/%{namer}.service %{buildroot}%{_unitdir}
install -p -D -m 644 %{_topdir}/SOURCES/%{namer}.default %{buildroot}%{_sysconfdir}/sysconfig/%{namer}
%post
/bin/touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache \
--quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
%systemd_post %{namer}.service
%preun
%systemd_preun %{namer}.service
%postun
/bin/touch --no-create %{_datadir}/icons/hicolor || :
%{_bindir}/gtk-update-icon-cache \
--quiet %{_datadir}/icons/hicolor 2> /dev/null|| :
%systemd_postun_with_restart %{namer}.service
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files
%doc changelog.txt licenses/license.txt
%{_datadir}/*/*
%{_exec_prefix}/lib/*
%{_exec_prefix}/bin/*
%{_sysconfdir}/sysconfig/*
%changelog
* Tue Apr 9 2024 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20240409.git
- Fix package binaries installing and systemd service
* Mon Mar 25 2024 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20240325.git
- Updated to build from arch-specific .Net8 binaries
* Wed Jun 21 2017 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20170621.git
- Added the service file to the install
* Thu Apr 28 2016 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20160423.git
- Made a binary version of the spec file
* Sat Apr 23 2016 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20160423.git
- Updated list of dependencies
* Thu Mar 27 2014 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20140326.git
- Moved to /usr/lib
- Fixed minor build issues
* Wed Mar 26 2014 Kenneth Skovhede <kenneth@duplicati.com> - 2.0.0-0.20140326.git
- Updated patch files
- Fixed minor build issues
* Wed May 29 2013 Ismael Olea <ismael@olea.org> - 2.0.0-0.20130529.git
- removed MacOSX support and deps
- first compiler building spec
* Mon May 13 2013 Ismael Olea <ismael@olea.org> - 1.3.4-1
- removing desktop contents
* Sun May 12 2013 Ismael Olea <ismael@olea.org> - 1.3.4-0
- first dirty package for upstream compiled binary
+12
View File
@@ -0,0 +1,12 @@
#!/bin/bash
# This script is a workaround for Docker desktop not handling
# permissions for mounted volumes correctly.
# This script is intended to be run inside a Docker container
mkdir /build-temp
cp -R $1/* /build-temp
rpmbuild -bb --target $2 --define "_topdir /build-temp" SOURCES/duplicati.spec
mv /build-temp/RPMS/$2/*.rpm /$1/build.rpm
@@ -0,0 +1,11 @@
# Defaults for duplicati initscript
# sourced by /lib/systemd/system/duplicati.service
# installed at /etc/sysconfig/duplicati.default by the maintainer scripts
# copy to /etc/sysconfig/duplicati and edit if required
#
# This is a POSIX shell fragment
#
# Additional options that are passed to the Daemon.
DAEMON_OPTS=""
@@ -0,0 +1,13 @@
[Unit]
Description=Duplicati web-server
After=network.target
[Service]
Nice=19
IOSchedulingClass=idle
EnvironmentFile=-/etc/sysconfig/duplicati
ExecStart=/usr/bin/duplicati-server $DAEMON_OPTS
Restart=on-failure
[Install]
WantedBy=multi-user.target