You've already forked pgbackrest
							
							
				mirror of
				https://github.com/pgbackrest/pgbackrest.git
				synced 2025-10-30 23:37:45 +02:00 
			
		
		
		
	Remove unmaintained/unused development environment build files.
The Vagrantfile has not been maintained in years and the Dockerfile is only used by a single developer. There are instructions for building a development environment in CONTRIBUTING.md so these build files are no longer required.
This commit is contained in:
		| @@ -1,38 +0,0 @@ | ||||
| # export PGB=pgbackrest;export PGB_IMAGE=$PGB/test:u22-main;PGB_REPO=~/Documents/Code/$PGB | ||||
| # docker build --squash -f $PGB_REPO/test/Dockerfile -t $PGB_IMAGE . | ||||
| # docker run --privileged -itd --name $PGB-test -h $PGB-test -v $PGB_REPO:/home/vagrant/$PGB $PGB_IMAGE | ||||
| # | ||||
| # When running test.pl --code-format permissions may get munged. Run this from the pgbackrest/test path to fix them: | ||||
| #     find .. | grep "\.[ch]$" | xargs xattr -rc && find .. | grep "\.[ch]$" | xargs chmod -x | ||||
| FROM ubuntu:jammy | ||||
|  | ||||
| # Install packages | ||||
| RUN apt-get update | ||||
| RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ | ||||
|         sudo vim htop jq rsync sysstat curl \ | ||||
|         libdbd-pg-perl libxml-checker-perl libyaml-perl \ | ||||
|         devscripts build-essential lintian git cloc txt2man debhelper libssl-dev zlib1g-dev libperl-dev libxml2-dev liblz4-dev \ | ||||
|         liblz4-tool libpq-dev autoconf-archive zstd libzstd-dev bzip2 libbz2-dev pkg-config libyaml-dev libc6-dbg wget meson \ | ||||
|         ccache valgrind tzdata uncrustify libssh2-1-dev | ||||
|  | ||||
| # Install Docker | ||||
| RUN groupadd -g5000 docker | ||||
| RUN curl -fsSL https://get.docker.com | sh | ||||
|  | ||||
| # Create vagrant user | ||||
| RUN adduser --ingroup=docker -uid=5000 --disabled-password --gecos \"\" vagrant | ||||
|  | ||||
| # Mark git path as safe | ||||
| RUN sudo -u vagrant git config --global --add safe.directory /home/vagrant/pgbackrest | ||||
|  | ||||
| # Configure sudo | ||||
| RUN echo '%docker ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers | ||||
|  | ||||
| # Mount tmpfs at /home/vagrant/test for faster testing | ||||
| RUN sudo -u vagrant mkdir -m 770 /home/vagrant/test | ||||
| RUN echo 'tmpfs /home/vagrant/test tmpfs size=4096M 0 1' >> /etc/fstab | ||||
|  | ||||
| USER vagrant | ||||
| WORKDIR /home/vagrant | ||||
|  | ||||
| ENTRYPOINT sudo rm -f /var/run/docker.pid && sudo mount -a && sudo dockerd | ||||
							
								
								
									
										160
									
								
								test/Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										160
									
								
								test/Vagrantfile
									
									
									
									
										vendored
									
									
								
							| @@ -1,160 +0,0 @@ | ||||
| Vagrant.configure(2) do |config| | ||||
|     config.vm.provider :virtualbox do |vb| | ||||
|         vb.memory = 4096 | ||||
|         vb.cpus = 8 | ||||
|     end | ||||
|  | ||||
|     # Increase disk size if the vagrant-disksize plugin is available. To install the plugin: vagrant plugin install vagrant-disksize | ||||
|     if Vagrant.has_plugin?('vagrant-disksize') | ||||
|       config.disksize.size = '64GB' | ||||
|     end | ||||
|  | ||||
|     # Ubuntu 18.04 | ||||
|     # | ||||
|     # Full development and test environment which should be used by default. | ||||
|     #------------------------------------------------------------------------------------------------------------------------------- | ||||
|     config.vm.define "default", primary: true do |default| | ||||
|         default.vm.box = "ubuntu/jammy64" | ||||
|         default.vm.box_version = "20220423.0.0" | ||||
|  | ||||
|         default.vm.provider :virtualbox do |vb| | ||||
|             vb.name = "pgbackrest-test" | ||||
|         end | ||||
|  | ||||
|         # Provision the VM | ||||
|         default.vm.provision "shell", inline: <<-SHELL | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Build Begin' && date | ||||
|  | ||||
|             # Suppress "dpkg-reconfigure: unable to re-open stdin: No file or directory" warning | ||||
|             export DEBIAN_FRONTEND=noninteractive | ||||
|  | ||||
|             # Assign a host name | ||||
|             sed -i 's/^127\.0\.0\.1\t.*/127\.0\.0\.1\tlocalhost pgbackrest-test/' /etc/hosts | ||||
|             hostnamectl set-hostname pgbackrest-test | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Update Apt' && date | ||||
|             apt-get update | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Synchronize Date' && date | ||||
|             apt-get install -y ntpdate | ||||
|             ntpdate pool.ntp.org | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Use Google DNS' && date | ||||
|             echo 'supersede domain-name-servers 8.8.8.8;' >> /etc/dhcp/dhclient.conf | ||||
|             /etc/init.d/networking restart | ||||
|  | ||||
|             # Set time sync settings so builds don't fail with clock skew errors. If a build does fail with "clock skew detected", | ||||
|             # rerun the following at the command line. | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Time Sync Settings' && date | ||||
|             sudo /etc/init.d/virtualbox-guest-utils stop | ||||
|             sudo /usr/sbin/VBoxService --timesync-set-on-restore --timesync-interval 5000 --timesync-set-threshold 1 | ||||
|  | ||||
|             # Create /tmp/pgbackrest and give ownership to root so we know unit tests are not writing there | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Create /tmp/pgbackrest owned by root' && date | ||||
|             sudo mkdir -p /tmp/pgbackrest | ||||
|             sudo chown root:root /tmp/pgbackrest | ||||
|             sudo chmod 700 /tmp/pgbackrest | ||||
|  | ||||
|             # Mount tmpfs at /home/vagrant/test for faster testing | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Mount tmpfs' && date | ||||
|             sudo -u vagrant mkdir -p -m 770 /home/vagrant/test | ||||
|             echo 'tmpfs /home/vagrant/test tmpfs size=2560M 0 1' >> /etc/fstab | ||||
|             mount -a | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Install Perl Modules' && date | ||||
|             apt-get install -y libdbd-pg-perl libxml-checker-perl libyaml-perl | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Install Build Tools' && date | ||||
|             apt-get install -y devscripts build-essential lintian git cloc txt2man debhelper libssl-dev zlib1g-dev libperl-dev \ | ||||
|                  libxml2-dev liblz4-dev liblz4-tool libpq-dev autoconf-archive zstd libzstd-dev bzip2 libbz2-dev pkg-config \ | ||||
|                  libyaml-dev libc6-dbg valgrind meson ccache uncrustify libssh2-1-dev | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Install Docker' && date | ||||
|             curl -fsSL https://get.docker.com | sh | ||||
|             sudo usermod -aG docker vagrant | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Install Dev Utilities' && date | ||||
|             apt-get install -y vim htop jq | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             # echo 'Install TeX Live' && date | ||||
|             # Not installed by default since latex is only needed for releases and PDF development/testing | ||||
|             # apt-get install -y --no-install-recommends texlive-latex-base texlive-latex-extra texlive-fonts-recommended | ||||
|             # apt-get install -y texlive-font-utils | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Build VM Images' && date | ||||
|             sudo su - vagrant -c '/home/vagrant/pgbackrest/test/test.pl --vm-build' | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Build End' && date | ||||
|  | ||||
|             # Useful commands | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             # Force remove all containers: | ||||
|             # docker rm -f $(docker ps -a -q) | ||||
|             # Force remove all images: | ||||
|             # docker rmi -f $(docker images -q) | ||||
|         SHELL | ||||
|  | ||||
|         # Mount pgbackrest path for testing | ||||
|         default.vm.synced_folder "..", "/home/vagrant/pgbackrest" | ||||
|     end | ||||
|  | ||||
|     # FreeBSD 12 | ||||
|     # | ||||
|     # Basic environment to build pgBackRest. | ||||
|     #------------------------------------------------------------------------------------------------------------------------------- | ||||
|     config.vm.define "fb12", autostart: false do |fb12| | ||||
|         fb12.vm.box = "generic/freebsd12" | ||||
|         fb12.vm.box_version = "2.0.6" | ||||
|  | ||||
|         fb12.vm.provider :virtualbox do |vb| | ||||
|             vb.name = "pgbackrest-test-fb12" | ||||
|         end | ||||
|  | ||||
|         # Provision the VM | ||||
|         fb12.vm.provision "shell", inline: <<-SHELL | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Build Begin' && date | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Install Build Tools' && date | ||||
|  | ||||
|             pkg install -y git postgresql-libpqxx pkgconf libxml2 gmake perl5 p5-YAML-LibYAML rsync | ||||
|  | ||||
|             #----------------------------------------------------------------------------------------------------------------------- | ||||
|             echo 'Build End' && date | ||||
|         SHELL | ||||
|     end | ||||
|  | ||||
|     # MacOS | ||||
|     # | ||||
|     # Basic environment to build/test pgBackRest using homebrew installed in the local user account. | ||||
|     #------------------------------------------------------------------------------------------------------------------------------- | ||||
|     # git clone --depth=1 https://github.com/Homebrew/brew ~/homebrew | ||||
|     # ~/homebrew/bin/brew install -q pkg-config openssl@1.1 libpq libxml2 libyaml cpanm meson | ||||
|     # ~/homebrew/bin/cpanm --force --local-lib=~/homebrew/perl5 install YAML::XS XML::Checker::Parser | ||||
|     # | ||||
|     # export PATH="${HOME?}/homebrew/bin:$PATH" | ||||
|     # export LDFLAGS="-L${HOME?}/homebrew/opt/openssl@1.1/lib -L${HOME?}/homebrew/opt/libpq/lib -L${HOME?}/homebrew/opt/libxml2/lib" | ||||
|     # export LDFLAGS="${LDFLAGS?} -L${HOME?}/homebrew/opt/libyaml/lib" | ||||
|     # export CPPFLAGS="-I${HOME?}/homebrew/opt/openssl@1.1/include -I/${HOME?}/homebrew/opt/libpq/include" | ||||
|     # export CPPFLAGS="${CPPFLAGS?} -I${HOME?}/homebrew/opt/libxml2/include/libxml2 -I/${HOME?}/homebrew/opt/libyaml/include" | ||||
|     # export PERL5LIB=~/homebrew/perl5/lib/perl5"${PERL5LIB:+:${PERL5LIB}}" | ||||
|     # export PKG_CONFIG_PATH=~/homebrew/opt/libpq/lib/pkgconfig:~/homebrew/opt/openssl@1.1/lib/pkgconfig | ||||
|  | ||||
|     # Don't share the default vagrant folder | ||||
|     config.vm.synced_folder ".", "/vagrant", disabled: true | ||||
| end | ||||
		Reference in New Issue
	
	Block a user