From patchwork Sun Feb 26 19:05:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6627 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4PPtPt1m2Mz3wjy for ; Sun, 26 Feb 2023 19:05:54 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4PPtPr0qWgzWR; Sun, 26 Feb 2023 19:05:52 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4PPtPq4yqsz2ynQ; Sun, 26 Feb 2023 19:05:51 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4PPtPn4yrSz2xMT for ; Sun, 26 Feb 2023 19:05:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4PPtPm405gzWR; Sun, 26 Feb 2023 19:05:48 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1677438348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=uy8wNHhlGRAMj5b5KbdWkyUHQSwT7epHLpb/mQ5j0jI=; b=2/BgX8e6CnfVWL20G5FP8w43veUHl5Fa+P3+4BkAYKsgoDlUw5jd2PbyAAxQe2VDg+GnSG f6BpvC1ypg/wutAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1677438348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=uy8wNHhlGRAMj5b5KbdWkyUHQSwT7epHLpb/mQ5j0jI=; b=snqdX1dI5/BkPcOwLjzTuTzswu+E64w9MyQuzOJb/ZrhAZAZMAIND76J7hxkPpRH18tZrV DYmmfr82FPqHZPzpV6G5EM6lk0l+I/2ITLLCbqChR4mshYvqdhkmkda/oa2vDbRgOx6F1+ H+zJoLQJ85dx/a/+A9jePPB7WDFoskTcrCC82sMSz4/XtIuujwWQOEg4R7VZpkGXWmq3Mx 3oybELHahw4recJMkkCgoTO6h0qVhWj2HMu4x4IuTDhyemyjB2+5BG9q2msWxNnXYU/8h8 A3o5basesf997Pr78Nmnx7b0mvWQCr/LIUJof9q0/fQr8XyLSqFKP2JvqVw1CA== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] git: Shrink package Date: Sun, 26 Feb 2023 20:05:41 +0100 Message-Id: <20230226190541.674498-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" * Drop daemon, gitweb, SVN, CVS and p4 sub-packages. * Drop git daemon related systemd files. * Drop gitweb related config files. Signed-off-by: Stefan Schantl --- git/git.conf.httpd | 7 -- git/git.nm | 161 +++++++-------------------------------- git/gitweb.conf | 53 ------------- git/systemd/git.socket | 9 --- git/systemd/git@.service | 8 -- 5 files changed, 27 insertions(+), 211 deletions(-) delete mode 100644 git/git.conf.httpd delete mode 100644 git/gitweb.conf delete mode 100644 git/systemd/git.socket delete mode 100644 git/systemd/git@.service diff --git a/git/git.conf.httpd b/git/git.conf.httpd deleted file mode 100644 index 4f4eac7c7..000000000 --- a/git/git.conf.httpd +++ /dev/null @@ -1,7 +0,0 @@ -Alias /git /var/www/git - - - Options +ExecCGI - AddHandler cgi-script .cgi - DirectoryIndex gitweb.cgi - diff --git a/git/git.nm b/git/git.nm index c9919af74..b3b5f789b 100644 --- a/git/git.nm +++ b/git/git.nm @@ -5,7 +5,7 @@ name = git version = 2.38.1 -release = 2 +release = 3 groups = Development/Tools url = http://git-scm.com/ @@ -46,14 +46,13 @@ build ETC_GITCONFIG = %{sysconfdir}/gitconfig DESTDIR = %{BUILDROOT} INSTALL = install -p - GITWEB_PROJECTROOT = %{localstatedir}/git GNU_ROFF = 1 NO_CROSS_DIRECTORY_HARDLINKS = 1 PYTHON_PATH = %{python3} prefix = %{prefix} gitexecdir = lib/git-core htmldir = %{datadir}/doc - gitwebdir = %{localstatedir}/www/git + NO_GITWEB=1 EOF # Remove shebang from bash-completion script. @@ -75,132 +74,42 @@ build install -v -m 644 contrib/completion/git-completion.bash \ %{BUILDROOT}%{sysconfdir}/bash_completion.d/git - # Create folder for git-daemon. - mkdir -pv %{BUILDROOT}%{sharedstatedir}/git - - # Create folder for gitweb. - mkdir -pv %{BUILDROOT}%{sysconfdir}/httpd/conf.d - - # Install config files for gitweb. - install -pm 0664 %{DIR_SOURCE}/gitweb.conf \ - %{BUILDROOT}%{sysconfdir}/gitweb.conf - - install -pm 0644 %{DIR_SOURCE}/git.conf.httpd \ - %{BUILDROOT}%{sysconfdir}/httpd/conf.d/git.conf + # Remove git-daemon related files + rm -rvf %{BUILDROOT}/usr/lib/git-core/git-daemon + rm -rvf %{BUILDROOT}%{mandir}/man1/git-daemon* + + # Remove SVN related files + rm -rvf %{BUILDROOT}/usr/lib/git-core/git-svn + rm -rvf %{BUILDROOT}%{mandir}/man1/git-svn* + rm -rvf %{BUILDROOT}%{perl_vendorlib}/Git/SVN*.pm + rm -rvf %{BUILDROOT}%{perl_vendorlib}/Git/SVN/ + rm -rvf %{BUILDROOT}%{datadir}/perl5/Git/SVN/ + rm -rvf %{BUILDROOT}%{datadir}/perl5/Git/SVN*.pm + + # Remove CVS related files + rm -rvf %{BUILDROOT}%{bindir}/git-cvsserver + rm -rvf %{BUILDROOT}/usr/lib/git-core/*cvs* + rm -rvf %{BUILDROOT}%{mandir}/man1/*cvs* + rm -rvf %{BUILDROOT}%{mandir}/man7/*cvs* + + # Remove Perforce depots related files. + rm -rvf %{BUILDROOT}/usr/lib/git-core/*p4* + rm -rvf %{BUILDROOT}/usr/lib/git-core/mergetools/p4* + rm -rvf %{BUILDROOT}%{mandir}/man1/*p4* end end packages - # Define %{gitcoredir} to have a more handy name. - gitcoredir = %{prefix}/lib/git-core - package %{name} requires less openssh-clients - rsync /usr/bin/vi end recommends %{name}-email - end - end - - package %{name}-daemon - summary = Git protocol daemon. - description - The git daemon for supporting git:// access to git repositories. - end - - requires - git=%{thisver} - end - - files - %{gitcoredir}/git-daemon - %{mandir}/man1/git-daemon* - %{sharedstatedir}/git - %{unitdir}/git@.service - %{unitdir}/git.socket - end - - script postin - systemctl daemon-reload >/dev/null 2>&1 || : - end - - script preun - systemctl --no-reload disable git.socket >/dev/null 2>&1 || : - systemctl stop git.socket >/dev/null 2>&1 || : - systemctl stop git@.service >/dev/null 2>&1 || : - end - - script postun - systemctl daemon-reload >/dev/null 2>&1 || : - end - - script postup - systemctl daemon-reload >/dev/null 2>&1 || : - systemctl try-restart git.socket >/dev/null 2>&1 || : - end - end - - package %{name}-gitweb - arch = noarch - - summary = Simple web interface to git repositories. - description - Simple web interface to track changes in git repositories - end - - requires - git=%{thisver} - end - - configfiles - %{sysconfdir}/gitweb.conf - %{sysconfdir}/httpd/conf.d/git.conf - end - - files - %{sysconfdir}/gitweb.conf - %{sysconfdir}/httpd/conf.d/git.conf - %{mandir}/man1/gitweb* - %{mandir}/man5/gitweb* - %{localstatedir}/www/git - end - end - - package %{name}-cvs - summary = Git tools for importing CVS repositories. - description = %{summary} - - requires - git=%{thisver} - end - - files - %{bindir}/git-cvsserver - %{gitcoredir}/*cvs* - %{mandir}/man1/*cvs* - %{mandir}/man7/*cvs* - end - end - - package %{name}-p4 - arch = noarch - - summary = Git tools for working with Perforce depots. - description = %{summary} - - requires - git=%{thisver} - end - - files - %{gitcoredir}/*p4* - %{gitcoredir}mergetools/p4merge - %{mandir}/man1/*p4* + rsync end end @@ -216,7 +125,7 @@ packages end files - %{gitcoredir}/git-send-email + /usr/lib/git-core/git-send-email %{mandir}/man1/git-send-email* end end @@ -236,23 +145,7 @@ packages %{perl_archlib} %{perl_vendorlib}/*.pm %{perl_vendorlib}/Git/*.pm - end - end - - package perl-Git-SVN - arch = noarch - - summary = Perl interface to Git::SVN. - description = %{summary} - - requires - git=%{thisver} - end - - files - %{mandir}/man3/Git::SVN* - %{perl_vendorlib}/Git/SVN*.pm - %{perl_vendorlib}/Git/SVN/ + %{datadir}/perl5/ end end diff --git a/git/gitweb.conf b/git/gitweb.conf deleted file mode 100644 index fe6ede43b..000000000 --- a/git/gitweb.conf +++ /dev/null @@ -1,53 +0,0 @@ -# The gitweb config file is a fragment of perl code. You can set variables -# using "our $variable = value"; text from "#" character until the end of a -# line is ignored. See perlsyn(1) man page for details. -# -# See /usr/share/doc/gitweb-*/README and /usr/share/doc/gitweb-*/INSTALL for -# more details and available configuration variables. - -# Set the path to git projects. This is an absolute filesystem path which will -# be prepended to the project path. -#our $projectroot = "/var/lib/git"; - -# Set the list of git base URLs used for URL to where fetch project from, i.e. -# the full URL is "$git_base_url/$project". By default this is empty -#our @git_base_url_list = qw(git://git.example.com -# ssh://git.example.com@PROJECTROOT@); - -# Enable the 'blame' blob view, showing the last commit that modified -# each line in the file. This can be very CPU-intensive. Disabled by default -#$feature{'blame'}{'default'} = [1]; -# -# Allow projects to override the default setting via git config file. -# Example: gitweb.blame = 0|1; -#$feature{'blame'}{'override'} = 1; - -# Disable the 'snapshot' link, providing a compressed archive of any tree. This -# can potentially generate high traffic if you have large project. Enabled for -# .tar.gz snapshots by default. -# -# Value is a list of formats defined in %known_snapshot_formats that you wish -# to offer. -#$feature{'snapshot'}{'default'} = []; -# -# Allow projects to override the default setting via git config file. -# Example: gitweb.snapshot = tbz2,zip; (use "none" to disable) -#$feature{'snapshot'}{'override'} = 1; - -# Disable grep search, which will list the files in currently selected tree -# containing the given string. This can be potentially CPU-intensive, of -# course. Enabled by default. -#$feature{'grep'}{'default'} = [0]; -# -# Allow projects to override the default setting via git config file. -# Example: gitweb.grep = 0|1; -#$feature{'grep'}{'override'} = 1; - -# Disable the pickaxe search, which will list the commits that modified a given -# string in a file. This can be practical and quite faster alternative to -# 'blame', but still potentially CPU-intensive. Enabled by default. -#$feature{'pickaxe'}{'default'} = [0]; -# -# Allow projects to override the default setting via git config file. -# Example: gitweb.pickaxe = 0|1; -#$feature{'pickaxe'}{'override'} = 1; diff --git a/git/systemd/git.socket b/git/systemd/git.socket deleted file mode 100644 index 3dec01d21..000000000 --- a/git/systemd/git.socket +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Git Activation Socket - -[Socket] -ListenStream=9418 -Accept=true - -[Install] -WantedBy=sockets.target diff --git a/git/systemd/git@.service b/git/systemd/git@.service deleted file mode 100644 index 185ff2569..000000000 --- a/git/systemd/git@.service +++ /dev/null @@ -1,8 +0,0 @@ -[Unit] -Description=Git Repositories Server Daemon -Documentation=man:git-daemon(1) - -[Service] -User=nobody -ExecStart=-/usr/libexec/git-core/git-daemon --base-path=/var/lib/git --export-all --user-path=public_git --syslog --inetd --verbose -StandardInput=socket