Skip to content

Commit 5325afd

Browse files
committed
Add ubuntu-ppa and Dockerfile
1 parent 9497855 commit 5325afd

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed

Dockerfile

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM ubuntu:22.10
2+
MAINTAINER Hippie Hacker <[email protected]>
3+
RUN apt-get update && \
4+
DEBIAN_FRONTEND="noninteractive" apt-get install --yes \
5+
software-properties-common \
6+
ripgrep \
7+
fasd \
8+
libtool-bin \
9+
sudo
10+
# Created a ppa for emacs + broadway&nativecomp (build/Dockerfile has some of the process documented)
11+
# We need a custom build to run against broadwayd
12+
RUN add-apt-repository ppa:hippiehacker/emacs-broadway --yes && \
13+
DEBIAN_FRONTEND="noninteractive" apt-get install --yes emacs-snapshot emacs-snapshot-el
14+
# Use upstream stable git
15+
RUN add-apt-repository ppa:git-core/ppa --yes && \
16+
DEBIAN_FRONTEND="noninteractive" apt-get install --yes git
17+
18+
# Add a user `coder` so that you're not developing as the `root` user
19+
RUN useradd coder \
20+
--create-home \
21+
--shell=/bin/bash \
22+
--uid=1000 \
23+
--user-group && \
24+
echo "coder ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers.d/nopasswd
25+
26+
USER coder
27+
28+
WORKDIR /home/coder
29+
30+
# # COPY fonts/* /home/gitpod/.local/share/fonts/
31+
# # RUN mkdir -p /home/gitpod/.local/share/fonts/
32+
RUN git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
33+
RUN git clone --depth 1 https://github.com/humacs/.doom.d ~/.doom.d
34+
# Will need to update the shell if we want these in the path
35+
# ENV PATH=$HOME/.doom.d/bin:$HOME/.emacs.d/bin:$PATH
36+
# yes answers 'y' to any questions from doom install
37+
# Would prefer not to, as the output get buffered.
38+
# Possibly a doom install bug, that we can't provide answeres via cli args
39+
RUN yes y | $HOME/.emacs.d/bin/doom install && $HOME/.emacs.d/bin/doom sync

ubuntu-ppa/.dput.cf

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[my-ppa]
2+
fqdn = ppa.launchpad.net
3+
method = ftp
4+
incoming = ~hippiehacker/ubuntu/emacs-broadway/
5+
login = anonymous
6+
allow_unsigned_uploads = 0

ubuntu-ppa/Dockerfile

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
FROM ubuntu:22.10
2+
3+
# Minimum necessary to add source ppa and build emacs broadway+nativecomp
4+
RUN apt-get update && \
5+
DEBIAN_FRONTEND="noninteractive" apt-get install --yes \
6+
software-properties-common \
7+
dpkg-dev \
8+
devscripts \
9+
libgccjit-12-dev \
10+
libgtk-3-bin
11+
12+
# Install latest Git using their official PPA
13+
RUN add-apt-repository ppa:git-core/ppa && \
14+
DEBIAN_FRONTEND="noninteractive" apt-get install --yes git
15+
16+
# Need to setup GPG key... note it MUST be RSA,
17+
# there is a known bug with the default EC keys
18+
# gpg --list-keys
19+
# /root/.gnupg/pubring.kbx
20+
# ------------------------
21+
# pub rsa4096 2022-11-06 [SC] [expires: 2024-11-05]
22+
# 70933F81146364F45C9BC7AF3F265859EC6F4FBA
23+
# uid [ultimate] Hippie Hacker <[email protected]>
24+
25+
# I'd also prefer to build from upstream savanna git,
26+
# but more research is needed to understand launchpad / debian build-from-git
27+
# RUN git clone --depth=1 git://git.sv.gnu.org/emacs.git
28+
# for now we'll use the ubuntu-elisp ppa for emacs-snapshot
29+
30+
# Add-apt-repo for emacs-src snapshot using the unofficial PPA
31+
RUN add-apt-repository ppa:ubuntu-elisp/ppa --yes && \
32+
sed -i -e 's/^#\ //' /etc/apt/sources.list.d/ubuntu-elisp-ubuntu-ppa-kinetic.list && \
33+
DEBIAN_FRONTEND="noninteractive" apt-get update
34+
35+
# Retrieve source and install build dependencies
36+
RUN DEBIAN_FRONTEND="noninteractive" apt-get source emacs-snapshot && \
37+
DEBIAN_FRONTEND="noninteractive" apt-get -y build-dep emacs-snapshot
38+
39+
# I copied the gpg.tgz in manually and untarred
40+
RUN export [email protected] && \
41+
echo some steps to setup GPG
42+
43+
# Setup ~/.dput.cf
44+
COPY .dput.cf /root/.dput.cf
45+
46+
# Could Add with sed OR figure out launchpad / bzr
47+
# https://help.launchpad.net/Code/FindingAndDownloading
48+
# https://code.launchpad.net/~ubuntu-elisp/emacs/+git/master/+new-recipe
49+
# https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted
50+
# https://git.launchpad.net/~ubuntu-elisp/emacs/ # look at the snapshot-packaging branch
51+
# https://git.launchpad.net/~ubuntu-elisp/emacs/log/
52+
# The actual debian folder appears here:
53+
# https://git.launchpad.net/~ubuntu-elisp/emacs/tree/debian
54+
# But this might not be long-lived, we just want to add
55+
# `--with-json=yes --with-modules=yes --with-native-compilation=yes --with-pgtk=yes --with-cairo=yes`
56+
57+
# We need to make the following changes to debian/control
58+
# Add the three lines with +
59+
# # common configure flags
60+
# confflags += --prefix=/usr
61+
# confflags += --sharedstatedir=/var/lib
62+
# confflags += --program-suffix="$(suffix)"
63+
#+ confflags += --with-modules=yes
64+
#+ confflags += --with-json=yes
65+
#+ confflags += --with-native-compilation=yes
66+
67+
# Add the two final lines with + in debian/control
68+
# # Gtk config options
69+
# confflags_gtk += $(confflags)
70+
# confflags_gtk += --with-x=yes
71+
# confflags_gtk += --with-x-toolkit=gtk3
72+
# confflags_gtk += --with-xwidgets=yes
73+
#+ confflags_gtk += --with-pgtk=yes
74+
#+ confflags_gtk += --with-cairo=yes
75+
76+
# The actual build process, signed changes, and upload
77+
RUN cd emacs-snapshot-* && \
78+
debuild -k70933F81146364F45C9BC7AF3F265859EC6F4FBA -S -sa && \
79+
dput ppa:hippiehacker/emacs-broadway ./emacs-snapshot_*source.changes
80+
81+
# Using this build

0 commit comments

Comments
 (0)