Skip to content

Commit b88b8f2

Browse files
committed
update readme
1 parent 8e5da03 commit b88b8f2

File tree

1 file changed

+20
-77
lines changed

1 file changed

+20
-77
lines changed

README.md

Lines changed: 20 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The goal of this project is twofold:
2424
- [Removing support for a distribution](#removing-support-for-a-distribution)
2525
- [Updating the build box's APT cache](#updating-the-build-boxs-apt-cache)
2626
- [Updating SSL certificates](#updating-ssl-certificates)
27-
* [Jenkins integration](#jenkins-integration)
27+
* [CI integration](#ci-integration)
2828
- [Debugging a packaging test failure](#debugging-a-packaging-test-failure)
2929
* [Tutorial: building your own packages](#tutorial-building-your-own-packages)
3030
* [Related projects](#related-projects)
@@ -49,20 +49,14 @@ Debian package definitions are located in the `debian_specs` directory:
4949
Other noteworthy tools:
5050

5151
* `shell` -- Open a shell in a new buildbox container for debugging purposes.
52-
* `jenkins/` -- Scripts to be run by our Jenkins continuous integration jobs, either after every commit or during release time.
52+
* `jenkins/` -- Scripts to be run by our continuous integration jobs, either after every commit or during release time.
5353

54-
This project utilizes Docker for isolation. Because of the usage of Docker, these tools can be run on any 64-bit Linux system, including non-Debian-based systems. Though in practice, we've only tested on Ubuntu.
54+
This project utilizes Docker for isolation. Because of the usage of Docker, these tools can be run on any 64-bit Linux system, though you do need the debian distro-info package installed.
5555

5656
## Development
5757

5858
This repository is included as a git submodule in the Passenger git repository, under the directory `packaging/debian`. Instead of cloning the `passenger_apt_automation` repository directly, you should clone the Passenger git repository, and work in the `packaging/debian` directory instead. This scheme allows each Passenger version to lock down to a specific version of `passenger_apt_automation`.
5959

60-
A Vagrantfile is provided so that you can develop this project in a VM. To get started, run:
61-
62-
host$ vagrant up
63-
64-
The Passenger source directory (`../..`) will be automatically mounted inside the VM under `/passenger`.
65-
6660
## Package building process
6761

6862
The package build process is as follows. First, the `build` script is used to build Debian packages from a Passenger source code directory. Next, either the `test` script is run to test the built packages, or the `publish` script is run to publish the built packages to repos.phusionpassenger.com.
@@ -103,10 +97,6 @@ When the build script is finished, the output directory (`-o`) will contain one
10397
|
10498
...
10599

106-
#### Vagrant notes
107-
108-
When using Vagrant, the directories referred to by `-w` and `-c` must be native filesystem directories. That is, they may not be located inside /vagrant, because /vagrant is a remote filesystem. I typically use `-w ~/work -c ~/cache` when developing with Vagrant.
109-
110100
#### Troubleshooting
111101

112102
If anything goes wrong during a build, please take a look at the various log files in the work directory. Of interest are:
@@ -125,12 +115,6 @@ Once packages have been built, you can test them with the test script. Here is a
125115
* `-d` tells it where to find the packages that are to be tested. This must point to a subdirectory in the output directory produced by the build script, and the packages must match the test environment as specified by `-x`. For example, if you specified `-x noble`, and if the build script stored packages in the directory `output`, then you should pass `-d output/noble`.
126116
* `-c` tells it where the cache directory is. The test script caches files into this directory so that subsequent runs will be faster.
127117

128-
#### Vagrant notes
129-
130-
When using Vagrant, the directory referred to by `-c` must be a native filesystem directory. That is, it may not be located inside /vagrant, because /vagrant is a remote filesystem. I typically use `-c ~/cache` when developing with Vagrant.
131-
132-
The Vagrant VM uses 2 GB of RAM, so make sure your host has at least 4 GB.
133-
134118
### The publish script
135119

136120
Once packages have been built, you can publish them to repos.phusionpassenger.com. The `publish` script publishes all packages inside a build script output directory. Example invocation:
@@ -160,9 +144,8 @@ In these instructions, we assume that the new distribution is Ubuntu 20.04 "Foca
160144

161145
2. Add a definition for this new distribution to `internal/lib/distro_info.rb`.
162146

163-
1. Add to either the `UBUNTU_DISTRIBUTIONS` or the `DEBIAN_DISTRIBUTIONS` constant.
164-
2. Add to the `DEFAULT_DISTROS` constant.
165-
3. If it's a debian release you'll likely have to add the signing key to the buildbox's install.sh. (If debootstrap complains about a key in step 6).
147+
1. Add to the `DEFAULT_DISTROS` constant.
148+
2. If it's a debian release you'll likely have to add the signing key to the buildbox's install.sh. (If debootstrap complains about a key in step 6).
166149

167150
3. Run `internal/scripts/regen_distro_info_script.sh`.
168151

@@ -171,10 +154,10 @@ In these instructions, we assume that the new distribution is Ubuntu 20.04 "Foca
171154
make -C docker-images buildbox
172155

173156
5. Update the package definitions in `debian_specs/`.
174-
157+
175158
1. Check if new ruby is available in distro update versions or comments in `debian_specs/passenger/helpers.rb`
176159
2. Add `<% if %>` statements accordingly to output the appropriate content for the target distribution. (e.g. in `debian_specs/passenger/control.erb`)
177-
160+
178161
6. Build publish packages for this distribution only. You can do that by running the build script with the `-d` option.
179162

180163
For example:
@@ -186,7 +169,7 @@ In these instructions, we assume that the new distribution is Ubuntu 20.04 "Foca
186169
1. Create `docker-images/testbox-ubuntu-20.04/` (copy of testbox of previous release)
187170
2. Set the correct From in `docker-images/testbox-ubuntu-20.04/Dockerfile`
188171
3. Edit `docker-images/Makefile` and add entries for this new testbox.
189-
172+
190173
make -C docker-images testbox-ubuntu-20.04
191174

192175
When done, test Passenger under the new testbox:
@@ -210,9 +193,7 @@ In these instructions, we assume that the new distribution is Ubuntu 20.04 "Foca
210193
git pull
211194
cd ../..
212195

213-
2. Update `dev/ci/tests/debian/Jenkinsfile` and add this new distro under the `parameters` section.
214-
215-
3. Commit and push the result:
196+
2. Commit and push the result:
216197

217198
git commit -a -m "Add packaging support for Ubuntu 20.04 Focal"
218199
git push
@@ -244,9 +225,7 @@ In these instructions, we assume that the distribution to be removed is Ubuntu 2
244225
git pull
245226
cd ../..
246227

247-
2. Update `dev/ci/tests/debian/Jenkinsfile` and remove the deprecated distro under the `params` section.
248-
249-
3. Commit and push the result:
228+
2. Commit and push the result:
250229

251230
git commit -a -m "Remove packaging support for Ubuntu 20.04 Focal"
252231
git push
@@ -265,10 +244,6 @@ The first way is by deleting the pbuilder chroot tarball in the cache directory.
265244

266245
rm ~/cache/base-noble-amd64.tgz
267246

268-
or
269-
270-
find /data/jenkins/ -name 'base-noble-*.tgz' -delete
271-
272247
The second way is by updating it in-place. For example:
273248

274249
1. Run: `./shell -c ~/cache`. This will drop you into the buildbox shell.
@@ -278,13 +253,13 @@ The second way is by updating it in-place. For example:
278253

279254
### Updating SSL certificates
280255

281-
The Jenkins publishing script posts to some HTTPS servers. For security reasons, we pin the certificates, but these certificates expire after a while. You can update them by running:
256+
The publishing script posts to some HTTPS servers. For security reasons, we pin the certificates, but these certificates expire after a while. You can update them by running:
282257

283258
./internal/scripts/pin_certificates
284259

285-
## Jenkins integration
260+
## CI integration
286261

287-
The `jenkins` directory contains scripts which are invoked from jobs in the Phusion Jenkins CI server.
262+
The `jenkins` directory contains scripts which are invoked from jobs in the Phusion CI server.
288263

289264
## Troubleshooting
290265

@@ -298,17 +273,12 @@ If a packaging test job fails, here's what you should do.
298273
git reset --hard <COMMIT FOR WHICH THE TEST FAILED>
299274
cd packaging/debian
300275

301-
2. If you're not on Linux, setup the Vagrant development environment and login to the VM:
302-
303-
vagrant up
304-
vagrant ssh
305-
306-
3. Build packages for the distribution for which the test failed.
276+
2. Build packages for the distribution for which the test failed.
307277

308278
./build -w ~/work -c ~/cache -o ~/output -p /passenger -d focal -a amd64 -j 2 -R pkg:all
309279

310280
Be sure to customize the value passed to `-d` based on the distribution for which the test failed.
311-
4. Run the tests with the debugging console enabled:
281+
3. Run the tests with the debugging console enabled:
312282

313283
./test -p /passenger -x focal -d ~/output/focal -c ~/cache -D
314284

@@ -327,8 +297,8 @@ Packages are built to `output/<distro>`. You can play around manually with exami
327297
dpkg -I passenger_5.1.x-1~distro1_amd64.deb # view info
328298
dpkg -i passenger_5.1.x-1~distro1_amd64.deb # install passenger (probably need to install a module too)
329299
apt --fix-broken install # to install dependencies
330-
331-
300+
301+
332302

333303
## Tutorial: building your own packages
334304

@@ -340,9 +310,7 @@ You can follow this tutorial on any OS you want. You do not necessarily have to
340310

341311
If you are following this tutorial on a Linux system, then you must [install Docker](https://www.docker.com/).
342312

343-
If you are following this tutorial on any other OS, then you must install [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/).
344-
345-
NOTE: If you are on macOS, installing Docker for Mac is NOT enough. You MUST use Vagrant+VirtualBox.
313+
NOTE: If you are on macOS, installing Docker for Mac is NOT enough. You MUST use a virtual machine with docker installed there.
346314

347315
### Step 1: Checkout out the desired source code
348316

@@ -360,21 +328,7 @@ Then go to the directory `packaging/debian`:
360328

361329
cd packaging/debian
362330

363-
### Step 2 (non-Linux only): spin up Vagrant VM
364-
365-
If you are on a Linux system, then you can skip to step 3.
366-
367-
If you are not on a Linux system, then you must spin up the Vagrant VM. Type:
368-
369-
vagrant up
370-
371-
Wait until the VM has booted, then run:
372-
373-
vagrant ssh
374-
375-
You will now be dropped in an SSH session inside the VM. Any futher steps must be followed inside this SSH session.
376-
377-
### Step 3: build packages
331+
### Step 2: build packages
378332

379333
Use the `./build` script to build packages. You must tell the build script which distribution and architecture it should build for. Run:
380334

@@ -383,7 +337,6 @@ Use the `./build` script to build packages. You must tell the build script which
383337
Replace `<PATH TO PASSENGER>` with one of these:
384338

385339
* If you are on a Linux system, it should be `../..`.
386-
* If you are on a non-Linux system (and using Vagrant), it should be `/passenger`.
387340

388341
Replace `<ARCHITECTURE>` with either `arm64` or `amd64`. Replace `<DISTRIBUTION>` with the codename of the distribution you want to build for. For example:
389342

@@ -398,23 +351,13 @@ You can find the codename of your distribution version on Wikipedia: [Ubuntu cod
398351
Here is an example invocation for building packages for Ubuntu 24.04, x86_64:
399352

400353
```bash
401-
# If you are on a Linux system:
402354
./build -p ../.. -w ~/work -c ~/cache -o output -a amd64 -d noble pkg:all
403-
404-
# If you are on a non-Linux system (and using Vagrant):
405-
./build -p /passenger -w ~/work -c ~/cache -o output -a amd64 -d noble pkg:all
406355
```
407356

408-
### Step 4: get packages, clean up
357+
### Step 3: get packages, clean up
409358

410359
When the build is finished, you can find the packages in the `output` directory.
411360

412-
If you are on a non-Linux OS (and thus using Vagrant), you should know that this `output` directory is accessible from your host OS too. It is a subdirectory inside `<PASSENGER REPO>/packaging/debian`.
413-
414-
If you are not on a Linux system, then you should spin down the Vagrant VM. Run this on your host OS, inside the `packaging/debian` subdirectory:
415-
416-
vagrant halt
417-
418361
## Related projects
419362

420363
* https://github.com/phusion/passenger_autobuilder

0 commit comments

Comments
 (0)