From nobody Wed Sep 25 07:41:04 2024 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XD7vW5KSnz5Wmmy for ; Wed, 25 Sep 2024 07:41:11 +0000 (UTC) (envelope-from alexey@hotmail.fi) Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazolkn190110001.outbound.protection.outlook.com [IPv6:2a01:111:f403:d201::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XD7vV2tc4z4J3H for ; Wed, 25 Sep 2024 07:41:10 +0000 (UTC) (envelope-from alexey@hotmail.fi) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (mx1.freebsd.org: domain of alexey@hotmail.fi designates 2a01:111:f403:d201::1 as permitted sender) smtp.mailfrom=alexey@hotmail.fi ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZjMeSXwu9o6qUedHcTo+eBn9xIWdzrYMI+HWsAGu1wEvyeHUqY9GmqQj7IcOoO7GY3SRPL7VDu45SbYKh91RrcvsLkhogNuS+zFs+FEMCaBgZBKZloUZkn768GOHKQpCdc5Z5PmnoOPKXbPMgYR4G7Fszfa4N5Pt1YiIlncg6AcW6/PZEbKMwj4lsPWq8htJ5b/dFmzSG3rLrOyh/Jt6T96y4TfyHfD/Otth1zn2xW76OldFYhyMfFG1qZ7U0oc6yQmz2jWxkdu7YCvrf7Pp7BIx3zWxpxW6o4StdCeAfhr0RDiXMx7rcoz/WtRmWJO68l8QmOBJNOUeG2tgRzcOIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C+CtHWvDTCnl6zkCCheUTI33mcw84h3jREds8qCN/bQ=; b=guSTo5iR11YDPBysgl0iRCkYS/pQANOfDSIKG4zw/313XNTYVWGRaqDE/G2qJcb8De0PWpjMcwH2SMd+NHprAPO059nbxP6e/Trr+/sKDK+Krd9zRRBZUJTzxvcey5Lq1/jpiwbaHl4F0GOFe3SXT1n9WrJWNkcyWlSm3PukUwh/wxzYlPgReYHAPbvu7DIg4hEw8HVU5GMu6yqPafEB3DUiElZEKdlEdmQ4MxU4xtwV4BR4B5quP0VP8VB8Ssy4/tCTGm9fAOQ6HweK8br+zFenWrJSVxpbWkW5Xed+VEqWlV4HilU9rrcrhuN0fIm9YOVt/phuLCtWYoTyhU6ZzA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from VI1PR03MB5054.eurprd03.prod.outlook.com (2603:10a6:803:bd::12) by DU0PR03MB9152.eurprd03.prod.outlook.com (2603:10a6:10:471::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Wed, 25 Sep 2024 07:41:05 +0000 Received: from VI1PR03MB5054.eurprd03.prod.outlook.com ([fe80::536:3c96:5d07:314d]) by VI1PR03MB5054.eurprd03.prod.outlook.com ([fe80::536:3c96:5d07:314d%6]) with mapi id 15.20.7982.022; Wed, 25 Sep 2024 07:41:05 +0000 Date: Wed, 25 Sep 2024 10:41:04 +0300 From: Alexey Vyskubov To: FreeBSD questions mailing list Subject: Cgit syntax highlighting Message-ID: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-ClientProxiedBy: MM0P280CA0017.SWEP280.PROD.OUTLOOK.COM (2603:10a6:190:a::6) To VI1PR03MB5054.eurprd03.prod.outlook.com (2603:10a6:803:bd::12) X-Microsoft-Original-Message-ID: <3euadwepziwjd3ompzr6jdtsg4x5jbe7zprrhdiml5nu476ks7@d5fx3pujhwoe> List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-questions@freebsd.org Sender: owner-freebsd-questions@FreeBSD.org MIME-Version: 1.0 Sender: Alexey Vyskubov X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR03MB5054:EE_|DU0PR03MB9152:EE_ X-MS-Office365-Filtering-Correlation-Id: 97f48adf-13b8-4550-305d-08dcdd356967 X-Microsoft-Antispam: BCL:0;ARA:14566002|7092599003|8060799006|6090799003|5072599009|19110799003|461199028|15080799006|440099028|3412199025; X-Microsoft-Antispam-Message-Info: 9X9Sv3S3NEnyMw4R0bN0ZHzAWMQEVBn66B8MAynd9RCx14C42+27W9J2H2KzY18Oa7Tm7oFZ4+8v0OkLHtvm3C/dm+hAYedDKWvlAyjugBiYud0xyrilcHf2RKPDu0HG0rhUXf3Bp+JiBs+enqlBYiWoajo5dr3dLBLUu6/G7HIb5AYLWsYmm4plJfKZONowpjIfm5Jt1tHcT+x10RTCclglPJslLHzRuw6yCfyrB4A7HiUjClFmQRIS/qNNfVn1EhMBb75zVwOk9k57Mbb/2hbK/fHXj/FofVxdBK/fDWezboYsMbaOiODO8yxCiLflWW3sDnf/B0PPlu8AsnDOdJJfGMJwbMakSfYPAjmyHKqero/hGTYx3kgPv90SLOwKaWlr4wqN37EoFORz+IYEillvrM33fEn24Gq1bE9IFIZgFPWhI7raW696Os6DzgWgOEYtgLtDANfPQ0nIn0ZgWVEnKwz1Js58iuMQb5aISqUhDdcCmUIOq0tLMHjni5Wrxo9gncNrUAX8NoM0AWQW8IJ4+k5Yvj1vK2vMQyxl9fWHeQukDLNRYNM5AtuztLywuBVWJDt2F1zv8YWA7PPWWd13qRE5UVh8R8aB1tdVlkGcR1ndUiwjLUzF7JmZDtLyqUVU0lX4Roxk1EVhvaz4eImVOt+KAMXhwvUdPyZHydl7p+0J572o/Yl1MmzekxP1aujbrRj71CUN+zHB5cIDRgUTAtQYQyb0pnauJ23ZUra6BQsH+QFabRfeEc4X9eTVX9vOG5CpbL6giQJrqsXnXg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PSuQoAypFNtPx8U2rvBu4LAfxIAHAGZNWmFRCrtpPu/fhLXEqzBRjkdYB0tz?= =?us-ascii?Q?SuMKGyWQzAdjaojNwoiHWU6wL5B5ab7F2B9w6GvfYzl7dX3wXjVkrGqrD0/g?= =?us-ascii?Q?wbWqOWF0bgQRUZyVLQKG1020HxGbonFuEdO7zlRWBRvrLUcHFafXuERAydQX?= =?us-ascii?Q?CYEBr6B/oYvwzQGoboeJ7wQgivR0A3u4SCjHJj9pbT18M1lawf3K0sou9XH/?= =?us-ascii?Q?ZLYhEgsYtmd9m/rA5eJY3wjvBRISZ4j2fSEOFtKYOf1rzwC9IgXSdfb81BSs?= =?us-ascii?Q?+Z8guGbMWJrOxsplt134CHbsk+JYISlkG+G7XT4NbpwFl9X1fiA8AqzRo/3Q?= =?us-ascii?Q?ma0lcubrtbRhWIGh9PNZuREggtrhZRSkEx3KudOpMmD7qWYPsB8nkF0WTvin?= =?us-ascii?Q?3lOhMxtK0su1Leg5wQvqKKhvcSgPIURRqEMj9TX/EaFLlA4CsqtL+dxij0bL?= =?us-ascii?Q?zReUXjKWVqFq2NNuywAIslVImgeO7009jQrLb+MZPgdIZJU6QnnZYtkhSfLp?= =?us-ascii?Q?PX/jIT67KVKJ6Kh3lylIiBB+ejAQe13h5MEUEjlyDcX7HLKA/vt8ppG4AQnV?= =?us-ascii?Q?tydYC/InhKobX7k55ZDKl6ydzvPF2OkRr9JttxyTN7QOP+Zj2+3JVTufD5Gw?= =?us-ascii?Q?fillHoCXsC6JE5i2S1PV12Ig27ERVNepYghxCqO/DDsN1+lthcQx+kEhkWhU?= =?us-ascii?Q?W6W+SSfgjpNI6r2SWSPT8YxNOWfJ/uQHG3E/jjFj1GPKPoZ2y3IOeJNGkChs?= =?us-ascii?Q?SbA/Q/uKfnqs7wYdrLZvX8Sww5JpPNgFVpcozu+pichk8Hv7BwxlUFv9xIHB?= =?us-ascii?Q?wbHollpAON7KHC6RePqFWZQvtg4z6aFTdPhHcAJOhJSvu+Wf+WZOT76garkx?= =?us-ascii?Q?/ng8Su4VbWoN00bcV/wvBMORJAC9GK4FZtkRerzhTqhzhXx5VJLsnDO3JsBi?= =?us-ascii?Q?i9ADafOdKuViOH03JyjTqh3cVjmRy/37li2hAAsDGzgCl5RWo8aRlp6TIQAF?= =?us-ascii?Q?P+OnxaAKeZVWAoIWIg0u4LmGdqAJxPRluSUby76ucUeDt1IAInlL27XBvEa0?= =?us-ascii?Q?e5H3/+HrE75nwE1KgUrxYS8EjoZvUGa+oPnD4FO7floQ/cx3sApDA3NNwDEq?= =?us-ascii?Q?HNJkGGemTmGDtTJnwZwHffa08tjf2Lymsujd+khqd4LRX8V65tdMeJjLMeWT?= =?us-ascii?Q?rmfW1Ho08pAIAmjX4MUc9PyPqVaEZgxfkqlqVm6A701lmDLPOixe3haDalM?= =?us-ascii?Q?=3D?= X-OriginatorOrg: sct-15-20-7762-17-msonline-outlook-fa1c0.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 97f48adf-13b8-4550-305d-08dcdd356967 X-MS-Exchange-CrossTenant-AuthSource: VI1PR03MB5054.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2024 07:41:05.4750 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR03MB9152 X-Spamd-Result: default: False [-3.12 / 15.00]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector10001:i=1]; NEURAL_HAM_MEDIUM(-0.99)[-0.988]; NEURAL_HAM_LONG(-0.59)[-0.591]; NEURAL_HAM_SHORT(-0.54)[-0.544]; FORGED_SENDER(0.30)[alexey@pentode.fi,alexey@hotmail.fi]; R_SPF_ALLOW(-0.20)[+ip6:2a01:111:f403:c000::/51]; MIME_GOOD(-0.10)[text/plain]; ASN(0.00)[asn:8075, ipnet:2a01:111:f000::/36, country:US]; RCPT_COUNT_ONE(0.00)[1]; FREEFALL_USER(0.00)[alexey]; MISSING_XM_UA(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; TO_DN_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[alexey@pentode.fi,alexey@hotmail.fi]; DMARC_NA(0.00)[pentode.fi]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org] X-Rspamd-Queue-Id: 4XD7vV2tc4z4J3H X-Spamd-Bar: --- Hello, I wonder what am I doing wrong. On FreeBSD 14.1-p5 I have installed cgit-1.2.3_1 and it works, except I am getting no source highlighting. My /usr/local/etc/cgitrc follows (unlike documentation says, it is not /etc/cgitrc; I have filled bug #281513): css=/cgit-assets/cgit.css favicon=/cgit-assets/favicon.ico logo=/cgit-assets/cgit.png scan-path=/Storage/git/ source-filter=/usr/local/lib/cgit/filters/syntax-highlighting.py I am using caddy as a web server; the relevant part of the Caddyfile is handle_path /cgit-assets/* { root * /usr/local/www/cgit file_server } handle { reverse_proxy unix//var/run/fcgiwrap/fcgiwrap.sock { transport fastcgi { env DOCUMENT_ROOT /usr/local/lib/cgit/ env SCRIPT_FILENAME /usr/local/www/cgit/cgit.cgi } } } As said, everything works but the syntax highlighting. I have pygments installed, and running /usr/local/lib/cgit/filters/syntax-highlighting.py foo.py provides something with code highlighting, but if I look at the source code of the page for the file it is not there (and the file is displayed without the highlighting, of course). I have found somewhere the instruction to add mimetype.gitblob+py=text/x-python to cgitrc, but it does not help. What should I do differently? P.S. I have tried non-Python approach with syntax-highliting.sh getting the same result. Moreover, if I put in source-filter some shell script which just leaves mark in /tmp, it seems that it is never called. -- Alexey I cannot receive HTML mail at this account. Hi, I am a signature virus. Add me to your signature to help me spread.