Recompiling Git with Gitweb in jail

I need some help. I want to get gitweb working in my jail instance (ezjail). I don't know how to recompile from within the jaill. Do I need to download the ports package in the jail or from the host system? Is there a separate package that has this compiled in?

FreeBSD 10.3
Code:
pkg query -e "%n=git" "%n-%v %Ok %Ov"
git-2.9.0 CONTRIB on
git-2.9.0 CURL on
git-2.9.0 CVS on
git-2.9.0 GITWEB off  <---TURN THAT ON
git-2.9.0 GUI off
git-2.9.0 HTMLDOCS off
git-2.9.0 ICONV on
git-2.9.0 NLS on
git-2.9.0 P4 on
git-2.9.0 PERL on
git-2.9.0 SEND_EMAIL on
git-2.9.0 SVN off
 
I don't know how to recompile from within the jail.
It works exactly the same way, why would it be different?

Do I need to download the ports package in the jail or from the host system?
There is no ports "package". There's a ports tree though, you can get it using portsnap(8) for example.

Is there a separate package that has this compiled in?
No, not unless you build it yourself.
 
Honestly I don't understand why GITWEB isn't turned on by default. GITWEB requires PERL (which is enabled by default) and adds maybe ~ 330kb to the installed size. I've opened a bug for this asking for it to be enabled by default: PR 211573.
 
Sorry,
I meant downloading the ports tree within the jail.


There is no ports "package". There's a ports tree though, you can get it using portsnap(8) for example.


No, not unless you build it yourself.[/QUOTE]
 
I was able to do a portsnap fetch
Code:
root@rancid3git:~ # portsnap extract
mkdir: /usr/ports: No such file or directory
 
It took to long to compile and I ran out of swap space on my host. :-(

I've never compiled or recompiled from ports so i'm new to this. Any tips would be great. Recompiling/Compiling git with GITWEB.
 
How "small" is the machine? I mean, how much memory? How much disk space? How large is your swap?
 
Code:
root@asm-freebsd01:~ # df -hT
Filesystem           Type       Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default   zfs        109G    8.0G    101G     7%    /
devfs                devfs      1.0K    1.0K      0B   100%    /dev
zroot/tmp            zfs        101G    120K    101G     0%    /tmp
zroot/usr/home       zfs        101G     39M    101G     0%    /usr/home
zroot/usr/ports      zfs        105G    3.5G    101G     3%    /usr/ports
zroot/usr/src        zfs        102G    547M    101G     1%    /usr/src
zroot/var/audit      zfs        101G     96K    101G     0%    /var/audit
zroot/var/crash      zfs        101G     96K    101G     0%    /var/crash
zroot/var/log        zfs        101G    328K    101G     0%    /var/log
zroot/var/mail       zfs        101G    160K    101G     0%    /var/mail
zroot/var/tmp        zfs        101G     96K    101G     0%    /var/tmp
zroot                zfs        101G     96K    101G     0%    /zroot
/usr/jails/basejail  nullfs     109G    8.0G    101G     7%    /jails/rancid3svn.borg.local/basejail
devfs                devfs      1.0K    1.0K      0B   100%    /jails/rancid3svn.borg.local/dev
fdescfs              fdescfs    1.0K    1.0K      0B   100%    /jails/rancid3svn.borg.local/dev/fd
procfs               procfs     4.0K    4.0K      0B   100%    /jails/rancid3svn.borg.local/proc
/usr/jails/basejail  nullfs     109G    8.0G    101G     7%    /jails/rancid3git.borg.local/basejail
devfs                devfs      1.0K    1.0K      0B   100%    /jails/rancid3git.borg.local/dev
fdescfs              fdescfs    1.0K    1.0K      0B   100%    /jails/rancid3git.borg.local/dev/fd
procfs               procfs     4.0K    4.0K      0B   100%    /jails/rancid3git.borg.local/proc
/usr/jails/basejail  nullfs     109G    8.0G    101G     7%    /jails/proxy01.borg.local/basejail
devfs                devfs      1.0K    1.0K      0B   100%    /jails/proxy01.borg.local/dev
fdescfs              fdescfs    1.0K    1.0K      0B   100%    /jails/proxy01.borg.local/dev/fd
procfs               procfs     4.0K    4.0K      0B   100%    /jails/proxy01.borg.local/proc
/usr/jails/basejail  nullfs     109G    8.0G    101G     7%    /jails/nagios.borg.local/basejail
devfs                devfs      1.0K    1.0K      0B   100%    /jails/nagios.borg.local/dev
fdescfs              fdescfs    1.0K    1.0K      0B   100%    /jails/nagios.borg.local/dev/fd
procfs               procfs     4.0K    4.0K      0B   100%    /jails/nagios.borg.local/proc
/usr/jails/basejail  nullfs     109G    8.0G    101G     7%    /jails/mta1.borg.local/basejail
devfs                devfs      1.0K    1.0K      0B   100%    /jails/mta1.borg.local/dev
fdescfs              fdescfs    1.0K    1.0K      0B   100%    /jails/mta1.borg.local/dev/fd
procfs               procfs     4.0K    4.0K      0B   100%    /jails/mta1.borg.local/proc
root@asm-freebsd01:~ # 

root@asm-freebsd01:~ # sysctl hw.physmem
hw.physmem: 1044865024
root@asm-freebsd01:~ #
 
1 GB? Am I reading this correctly? That's not a lot, especially since you're also using ZFS.

You could circumvent it by building your own packages using ports-mgmt/synth or ports-mgmt/poudriere. Just set up a VM at home, have it build all the packages you need and configure your jails to download it from your home system. That's how I update my VPS :)
 
In that case I definitely recommend setting up your own repository. Makes it a lot easier to adjust various default settings while keeping the ease of using packages.
 
I need some help. I want to get gitweb working in my jail instance (ezjail).
I am not sure if you are dead set on gitweb but unlike GitLab which is pain in the rear end to set up (even with the new port) I have great experience with Gogs. I run it out of Jail on the top of ZFS pool (check out old iocage 1.74 written in shell) for a group of about 60 researchers, Ph.D. students, and programmers.
 
Isn't Gogs also a replacement for Git? Or is JUST the web interface? I really just need an interface to show me my changes do a compare. I was using WebSVN with Subversion which is great.
 
Isn't Gogs also a replacement for Git? Or is JUST the web interface? I really just need an interface to show me my changes do a compare. I was using WebSVN with Subversion which is great.
Gogs is just a web interface GitHub style for Git. The only feature which is present in GitLab (full blown clone of GitHub) and GitHub we are missing is integration with continuous integration services (think of Jenkins). Everything else works exactly the same as GitHub and if you just want to use vanilla Git you can do it as well.
 
Sweet! how hard is it to setup? Do I have to pull it from Github and install it that way?
It is not very hard. I am half year overdue to write up notes for my own documentation. If you are not in the hurry I might post howto on this forum by the end of next week for example. The good starting point is

https://gogs.io/docs/installation/install_from_source

I use PostgreSQL as a backend which made things little more complicated (Google PostgreSQL, Jail, FreeBSD to see what I am talking about). With sqlite which should be OK (data base stores only credentials if you are using local authentication) for about 50 people. You will also need to setup proxy (Nginx in my case) which is 3 minute thing if you have done things like that in the past. I tested Gogs also on DragonFly BSD and OpenBSD. Works fantastic.
 
Back
Top