Kitten Technologies
Check-in [90f148565e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Automated configuration of new repos (finally)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:90f148565eb2e9c8881c52206e287e55d8a40ff2
User & Date: alaric 2017-11-10 15:25:51
Context
2017-11-10
15:27
Linked to pwdb check-in: 06d4f84336 user: alaric tags: trunk
15:25
Automated configuration of new repos (finally) check-in: 90f148565e user: alaric tags: trunk
14:34
Added pwdb CGI check-in: de5feebf7b user: alaric tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to README.wiki.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
This repository contains the Hyde source code for the Kitten Technologies web site at
[http://www.kitten-technologies.co.uk/] and the Fossil skin (that uses the same CSS as the
master site) for all the public Fossil repos. The <code>deploy.sh</code> script exports the skin from this repo and imports it into all my project repos, then pushes the lot to the live server.

To create a new fossil repo:

  *  Set the project name in "fossil ui": http://localhost:8080/setup_config
  *  Enable zipfile fetching: "fossil user capabilities nobody gjorz"
  *  Set the admin password: "fossil user password alaric"
  *  Copy it into "~snell-systems/kitten-technologies/fossil/", and
     chown it to "lighttpd"
  *  Add CGI file in this repo: <code>src/project</code>
  *  Link the local repo: fossil sync https://alaric@www.kitten-technologies.co.uk/project/<NAME>
  *  Write a README.wiki
  *  Generate a METADATA.rdf by copying an existing one and modifying it.
  *  Generate a DOWNLOAD.wiki by running:

     ~/personal/projects/kitten-technologies/bin/generate-download-page <NAME>

To publish it, put it in this repo:

  *  In the nav bar in <code>layouts/default.sxml</code>
  *  In the skin rollout code in <code>deploy.sh</code>
  *  In the prose in <code>src/index.wiki</code>
  *  Run ./deploy.sh




|
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5













6
7
8
9
10
11
12
This repository contains the Hyde source code for the Kitten Technologies web site at
[http://www.kitten-technologies.co.uk/] and the Fossil skin (that uses the same CSS as the
master site) for all the public Fossil repos. The <code>deploy.sh</code> script exports the skin from this repo and imports it into all my project repos, then pushes the lot to the live server.

To create a new fossil, use the configure-fossil-repo.sh tool.














To publish it, put it in this repo:

  *  In the nav bar in <code>layouts/default.sxml</code>
  *  In the skin rollout code in <code>deploy.sh</code>
  *  In the prose in <code>src/index.wiki</code>
  *  Run ./deploy.sh

Added configure-fossil-repo.sh.

































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/sh

# Usage:
#
# cd into existing fossil repo
#
# ~/personal/projects/kitten-technologies/configure-fossil-repo.sh SHORT_NAME
#
# Follow the instructions!

PROJECT_NAME="$1"
PROJECT_HOME="`pwd`"
KT_HOME="`dirname \"$0\"`"

REPOSITORY="`fossil status | grep ^repository: | sed 's/^repository: *//'`"
REMOTE_REPOSITORY="/guest/snell-systems/kitten-technologies/fossil/`basename \"$REPOSITORY\"`"

echo "PROJECT_NAME: [$PROJECT_NAME]"
echo "REPOSITORY: [$REPOSITORY]"
echo "PROJECT_HOME: [$PROJECT_HOME]"
echo "KT_HOME: [$KT_HOME]"

if [ ! -s "$PROJECT_HOME/README.wiki" ]
then
    echo "You need a README.wiki!"
    exit 1
fi

echo "Setting project name in the local repo..."
echo "insert or replace into config (name,value,mtime) values ('project-name','$PROJECT_NAME',strftime('%s','now'));" | fossil sqlite3

echo "Enabling zipfile fetching..."
fossil user capabilities nobody gjorz

echo "Setting the admin password..."
fossil user password alaric `pwdb -a ~/p/Kitten\ Technologies/Kitten-technologies\ fossils.pwdb password`

echo "Uploading repo..."
scp "$REPOSITORY" "snell-systems@love.warhead.org.uk:/tmp/$$.fossil"
echo "Please type the password for love.warhead.org.uk to use sudo:"
ssh -t love.warhead.org.uk "sudo sh -c '/bin/mv /tmp/$$.fossil \"$REMOTE_REPOSITORY\" ; /sbin/chown lighttpd \"$REMOTE_REPOSITORY\"'"

echo "Creating CGI file..."
echo "#!/usr/pkg/bin/fossil" > $KT_HOME/src/project/$PROJECT_NAME
echo "repository: $REMOTE_REPOSITORY" >> $KT_HOME/src/project/$PROJECT_NAME
chmod a+rx $KT_HOME/src/project/$PROJECT_NAME
(cd $KT_HOME; fossil add src/project/$PROJECT_NAME; fossil commit -m "Added $PROJECT_NAME cgi")

if [ -f "$PROJECT_HOME/METADATA.rdf" ]
then
    echo "Using existing METADATA.rdf"
else
    echo "Creating METADATA.rdf"

    cat >"$PROJECT_HOME/METADATA.rdf" <<EOF
PLEASE FIX THE FIXMES:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:admin="http://webns.net/mvcb/">
<Project rdf:about="http://www.kitten-technologies.co.uk/project/$PROJECT_NAME">
 <name>FIXME: $PROJECT_NAME</name>
 <description>FIXME</description>
 <homepage rdf:resource="http://www.kitten-technologies.co.uk/project/$PROJECT_NAME" />
 <download-page rdf:resource="http://www.kitten-technologies.co.uk/project/$PROJECT_NAME/doc/trunk/DOWNLOAD.wiki" />
 <bug-database rdf:resource="http://www.kitten-technologies.co.uk/project/$PROJECT_NAME/reportlist" />
 <programming-language>FIXME</programming-language>
 <license rdf:resource="http://usefulinc.com/doap/licenses/bsd" />
 <maintainer>
  <foaf:Person>
     <foaf:name>Alaric Snell-Pym</foaf:name>
     <foaf:homepage rdf:resource="http://www.snell-pym.org.uk/alaric/"/>
     <foaf:mbox_sha1sum>8b3ce83384145fe1187db8ef60c007efd7fae461</foaf:mbox_sha1sum>
  </foaf:Person>
 </maintainer>
 <repository>
   <Repository>
     <browse rdf:resource='http://www.kitten-technologies.co.uk/project/$PROJECT_NAME/dir?ci=tip' />
     <location rdf:resource='http://www.kitten-technologies.co.uk/project/$PROJECT_NAME' />
   </Repository>
 </repository>
</Project>
</rdf:RDF>
EOF

    $EDITOR "$PROJECT_HOME/METADATA.rdf"
    (cd "$PROJECT_HOME"; fossil add METADATA.rdf ; fossil commit -m 'Added METADATA.rdf')
fi

echo "Generating download page..."
$KT_HOME/bin/generate-download-page "$PROJECT_NAME"
(cd $PROJECT_HOME; fossil add DOWNLOAD.wiki; fossil commit -m "Added DOWNLOAD.wiki")

echo "Deploying kitten-technologies..."
(cd $KT_HOME ; ./deploy.sh)

echo "Establishing sync link..."
fossil sync "https://alaric@www.kitten-technologies.co.uk/project/$PROJECT_NAME"